This commit is contained in:
Shawn A
2018-03-01 13:19:40 -06:00
parent 92debb4bf8
commit 5ae132a7e9
+6 -1
View File
@@ -182,7 +182,12 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
DEBUG_WM(F("AutoConnect"));
// attempt to connect using saved settings, on fail fallback to AP config portal
WiFi.enableSTA(true);
if(!WiFi.enableSTA(true)){
// handle failure mode Brownout detector etc.
DEBUG_WM("[FATAL] Unable to enable wifi!");
return false;
}
_usermode = WIFI_STA;
// no getter for autoreconnectpolicy before this