Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/ESPAsync_WiFiManager-Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,9 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP
}
#endif // ( USING_ESP32_S2 || USING_ESP32_C3 )

// yield before processing our flags "connect" and/or "stopConfigPortal"
yield();

if (connect)
{
TimedOut = false;
Expand Down Expand Up @@ -914,14 +917,14 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP

if (stopConfigPortal)
{
TimedOut = false;

LOGERROR("Stop ConfigPortal");

stopConfigPortal = false;
break;
}

yield();

#if ( defined(TIME_BETWEEN_CONFIG_PORTAL_LOOP) && (TIME_BETWEEN_CONFIG_PORTAL_LOOP > 0) )
#if (_ESPASYNC_WIFIMGR_LOGLEVEL_ > 3)
#warning Using delay in startConfigPortal loop
Expand Down Expand Up @@ -1832,9 +1835,6 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request)
LOGDEBUG(F("Sent wifi save page"));

connect = true; //signal ready to connect/reset

// Restore when Press Save WiFi
_configPortalTimeout = DEFAULT_PORTAL_TIMEOUT;
}

//////////////////////////////////////////
Expand Down Expand Up @@ -1888,9 +1888,6 @@ void ESPAsync_WiFiManager::handleServerClose(AsyncWebServerRequest *request)
stopConfigPortal = true; //signal ready to shutdown config portal

LOGDEBUG(F("Sent server close page"));

// Restore when Press Save WiFi
_configPortalTimeout = DEFAULT_PORTAL_TIMEOUT;
}

//////////////////////////////////////////
Expand Down