From fcbb3e7987bfc0df27b2dd24e2a5f20f66276f3b Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Sun, 26 Mar 2017 00:28:45 +0200 Subject: [PATCH] Reconnect WiFi on Auth Expire Should Fix: https://github.com/espressif/arduino-esp32/issues/234 --- libraries/WiFi/src/WiFiGeneric.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/WiFi/src/WiFiGeneric.cpp b/libraries/WiFi/src/WiFiGeneric.cpp index 637ed049..b21accb6 100644 --- a/libraries/WiFi/src/WiFiGeneric.cpp +++ b/libraries/WiFi/src/WiFiGeneric.cpp @@ -184,6 +184,8 @@ esp_err_t WiFiGenericClass::_eventCallback(void *arg, system_event_t *event) WiFiSTAClass::_setStatus(WL_CONNECT_FAILED); } else if(reason == WIFI_REASON_BEACON_TIMEOUT || reason == WIFI_REASON_HANDSHAKE_TIMEOUT) { WiFiSTAClass::_setStatus(WL_CONNECTION_LOST); + } else if(reason == WIFI_REASON_AUTH_EXPIRE) { + WiFi.begin(); } else { WiFiSTAClass::_setStatus(WL_DISCONNECTED); }