@@ -863,6 +863,9 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP
863
863
}
864
864
#endif // ( USING_ESP32_S2 || USING_ESP32_C3 )
865
865
866
+ // yield before processing our flags "connect" and/or "stopConfigPortal"
867
+ yield ();
868
+
866
869
if (connect)
867
870
{
868
871
TimedOut = false ;
@@ -905,14 +908,14 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP
905
908
906
909
if (stopConfigPortal)
907
910
{
911
+ TimedOut = false ;
912
+
908
913
LOGERROR (" Stop ConfigPortal" );
909
914
910
915
stopConfigPortal = false ;
911
916
break ;
912
917
}
913
918
914
- yield ();
915
-
916
919
#if ( defined(TIME_BETWEEN_CONFIG_PORTAL_LOOP) && (TIME_BETWEEN_CONFIG_PORTAL_LOOP > 0) )
917
920
#if (_ESPASYNC_WIFIMGR_LOGLEVEL_ > 3)
918
921
#warning Using delay in startConfigPortal loop
@@ -1823,9 +1826,6 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request)
1823
1826
LOGDEBUG (F (" Sent wifi save page" ));
1824
1827
1825
1828
connect = true ; // signal ready to connect/reset
1826
-
1827
- // Restore when Press Save WiFi
1828
- _configPortalTimeout = DEFAULT_PORTAL_TIMEOUT;
1829
1829
}
1830
1830
1831
1831
// ////////////////////////////////////////
@@ -1879,9 +1879,6 @@ void ESPAsync_WiFiManager::handleServerClose(AsyncWebServerRequest *request)
1879
1879
stopConfigPortal = true ; // signal ready to shutdown config portal
1880
1880
1881
1881
LOGDEBUG (F (" Sent server close page" ));
1882
-
1883
- // Restore when Press Save WiFi
1884
- _configPortalTimeout = DEFAULT_PORTAL_TIMEOUT;
1885
1882
}
1886
1883
1887
1884
// ////////////////////////////////////////
0 commit comments