mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-22 02:32:10 +10:00
debugging
This commit is contained in:
+5
-2
@@ -612,8 +612,10 @@ boolean WiFiManager::stopConfigPortal(){
|
|||||||
// @todo what is the proper way to shutdown and free the server up
|
// @todo what is the proper way to shutdown and free the server up
|
||||||
server->stop();
|
server->stop();
|
||||||
server.reset();
|
server.reset();
|
||||||
|
// dnsServer->stop(); // free heap ?
|
||||||
dnsServer.reset();
|
dnsServer.reset();
|
||||||
|
|
||||||
|
|
||||||
if(!configPortalActive) return false;
|
if(!configPortalActive) return false;
|
||||||
|
|
||||||
// turn off AP
|
// turn off AP
|
||||||
@@ -625,8 +627,9 @@ boolean WiFiManager::stopConfigPortal(){
|
|||||||
bool ret = false;
|
bool ret = false;
|
||||||
ret = WiFi.softAPdisconnect(false);
|
ret = WiFi.softAPdisconnect(false);
|
||||||
if(!ret)DEBUG_WM(DEBUG_ERROR,F("[ERROR] disconnect configportal - softAPdisconnect FAILED"));
|
if(!ret)DEBUG_WM(DEBUG_ERROR,F("[ERROR] disconnect configportal - softAPdisconnect FAILED"));
|
||||||
// WiFi_Mode(_usermode); // restore users wifi mode, BUG https://github.com/esp8266/Arduino/issues/4372
|
delay(1000);
|
||||||
// DEBUG_WM("usermode",_usermode);
|
DEBUG_WM("restoring usermode",getModeString(_usermode));
|
||||||
|
WiFi_Mode(_usermode); // restore users wifi mode, BUG https://github.com/esp8266/Arduino/issues/4372
|
||||||
if(WiFi.status()==WL_IDLE_STATUS) WiFi.reconnect(); // restart wifi since we disconnected it in startconfigportal
|
if(WiFi.status()==WL_IDLE_STATUS) WiFi.reconnect(); // restart wifi since we disconnected it in startconfigportal
|
||||||
DEBUG_WM("wifi status:",getWLStatusString(WiFi.status()));
|
DEBUG_WM("wifi status:",getWLStatusString(WiFi.status()));
|
||||||
DEBUG_WM("wifi mode:",getModeString(WiFi.getMode()));
|
DEBUG_WM("wifi mode:",getModeString(WiFi.getMode()));
|
||||||
|
|||||||
Reference in New Issue
Block a user