Skip to content

Commit ef88e49

Browse files
Restart WIFI scan on failed scan.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent d14643b commit ef88e49

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

wled00/network.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ bool restartWiFiScanIfEnabled(bool requireMultiWiFi)
1212
#else
1313
if (!interfacesInited) return false;
1414
if (requireMultiWiFi && multiWiFi.size() <= 1) return false;
15-
if (WiFi.scanComplete() < 0) return false;
15+
const int scanStatus = WiFi.scanComplete();
16+
if (scanStatus == WIFI_SCAN_RUNNING) return false; // do not restart while scan is active
1617
findWiFi(true); // reinit WiFi scan
1718
return true;
1819
#endif

0 commit comments

Comments
 (0)