Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit c59ce78

Browse files
committed
fix: ending portal loop without prcessing its flags
1 parent fbe03eb commit c59ce78

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/ESPAsync_WiFiManager-Impl.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,9 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP
872872
}
873873
#endif // ( USING_ESP32_S2 || USING_ESP32_C3 )
874874

875+
// yield before processing our flags "connect" and/or "stopConfigPortal"
876+
yield();
877+
875878
if (connect)
876879
{
877880
TimedOut = false;
@@ -920,8 +923,6 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP
920923
break;
921924
}
922925

923-
yield();
924-
925926
#if ( defined(TIME_BETWEEN_CONFIG_PORTAL_LOOP) && (TIME_BETWEEN_CONFIG_PORTAL_LOOP > 0) )
926927
#if (_ESPASYNC_WIFIMGR_LOGLEVEL_ > 3)
927928
#warning Using delay in startConfigPortal loop
@@ -1832,9 +1833,6 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request)
18321833
LOGDEBUG(F("Sent wifi save page"));
18331834

18341835
connect = true; //signal ready to connect/reset
1835-
1836-
// Restore when Press Save WiFi
1837-
_configPortalTimeout = DEFAULT_PORTAL_TIMEOUT;
18381836
}
18391837

18401838
//////////////////////////////////////////
@@ -1888,9 +1886,6 @@ void ESPAsync_WiFiManager::handleServerClose(AsyncWebServerRequest *request)
18881886
stopConfigPortal = true; //signal ready to shutdown config portal
18891887

18901888
LOGDEBUG(F("Sent server close page"));
1891-
1892-
// Restore when Press Save WiFi
1893-
_configPortalTimeout = DEFAULT_PORTAL_TIMEOUT;
18941889
}
18951890

18961891
//////////////////////////////////////////

0 commit comments

Comments
 (0)