Fix for single wifi

This commit is contained in:
Blaz Kristan 2024-01-27 08:39:54 +01:00
parent 3eb412b750
commit df750c2a71

View File

@ -898,7 +898,7 @@ void WLED::handleConnection()
// ignore connection handling if WiFi is configured and scan still running
// or within first 2s if WiFi is not configured or AP is always active
if ((wifiConfigured && WiFi.scanComplete() < 0) || (now < 2000 && (!wifiConfigured || apBehavior == AP_BEHAVIOR_ALWAYS)))
if ((wifiConfigured && multiWiFi.size() > 1 && WiFi.scanComplete() < 0) || (now < 2000 && (!wifiConfigured || apBehavior == AP_BEHAVIOR_ALWAYS)))
return;
if (lastReconnectAttempt == 0 || forceReconnect) {
@ -950,7 +950,7 @@ void WLED::handleConnection()
if (!Network.isConnected()) {
if (interfacesInited) {
if (scanDone) {
if (scanDone && multiWiFi.size() > 1) {
DEBUG_PRINTLN(F("WiFi scan initiated on disconnect."));
findWiFi(true); // reinit scan
scanDone = false;