mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 16:38:16 +01:00
Early return when there are no wifi scan results (#5797)
This commit is contained in:
parent
d0ac202a3f
commit
10ca05b686
1 changed files with 5 additions and 0 deletions
|
@ -674,6 +674,11 @@ void WiFiComponent::wifi_process_event_(IDFWiFiEvent *data) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (it.number == 0) {
|
||||
// no results
|
||||
return;
|
||||
}
|
||||
|
||||
uint16_t number = it.number;
|
||||
std::vector<wifi_ap_record_t> records(number);
|
||||
err = esp_wifi_scan_get_ap_records(&number, records.data());
|
||||
|
|
Loading…
Reference in a new issue