From 9346cee76ce52fcdfe9c7ad146d5961e450a8faa Mon Sep 17 00:00:00 2001 From: Shawn A Date: Wed, 14 Mar 2018 10:46:08 -0500 Subject: [PATCH] fix autoreconnect on auth failure --- WiFiManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index e593d1a..6e88987 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -2131,8 +2131,7 @@ void WiFiManager::WiFiEvent(WiFiEvent_t event,system_event_info_t info){ // Serial.print("WM: EVENT: WIFI_REASON: ");Serial.println(info.disconnected.reason); if(info.disconnected.reason == WIFI_REASON_AUTH_EXPIRE || info.disconnected.reason == WIFI_REASON_AUTH_FAIL){ _lastconxresulttmp = 7; // hack in wrong password internally, sdk emit WIFI_REASON_AUTH_EXPIRE on some routers on auth_fail - return; - } + } else _lastconxresulttmp = WiFi.status(); // if(info.disconnected.reason == WIFI_REASON_NO_AP_FOUND) Serial.println("*WM: EVENT: WIFI_REASON: NO_AP_FOUND"); // Serial.println("*WM: Event: SYSTEM_EVENT_STA_DISCONNECTED, reconnecting"); WiFi.reconnect();