scan wifi asynchronously (#21498)

This commit is contained in:
Christian Baars 2024-05-27 15:17:09 +02:00 committed by GitHub
parent 00694abbde
commit 33f491a8e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1987,7 +1987,11 @@ void HandleWifiConfiguration(void) {
#ifdef USE_EMULATION
UdpDisconnect();
#endif // USE_EMULATION
int n = WiFi.scanNetworks();
int n = WiFi.scanNetworks(true);
while(n<0){
delay(50); // some magic number - maybe non optimal
n = WiFi.scanComplete();
}
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_WIFI D_SCAN_DONE));
if (0 == n) {