diff --git a/networkDevices/WifiDevice.cpp b/networkDevices/WifiDevice.cpp index 7d292c7..2ceff42 100644 --- a/networkDevices/WifiDevice.cpp +++ b/networkDevices/WifiDevice.cpp @@ -44,6 +44,8 @@ void WifiDevice::initialize() std::vector wm_menu; wm_menu.push_back("wifi"); wm_menu.push_back("exit"); + // reduced tieout if ESP is set to restart on disconnect + _wm.setConfigPortalTimeout(_restartOnDisconnect ? 60 * 3 : 60 * 30); _wm.setShowInfoUpdate(false); _wm.setMenu(wm_menu); _wm.setHostname(_hostname); @@ -63,7 +65,7 @@ void WifiDevice::initialize() if(!res) { Serial.println(F("Failed to connect. Wait for ESP restart.")); - delay(10000); + delay(1000); ESP.restart(); } else {