mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
tentative fix for #720
This commit is contained in:
+9
-1
@@ -272,7 +272,15 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
|
||||
// if already connected, or try stored connect
|
||||
// @note @todo ESP32 has no autoconnect, so connectwifi will always be called unless user called begin etc before
|
||||
if (WiFi.status() == WL_CONNECTED || connectWifi("", "") == WL_CONNECTED) {
|
||||
// @todo check if correct ssid == saved ssid when already connected
|
||||
bool connected = false;
|
||||
if (WiFi.status() == WL_CONNECTED){
|
||||
connected = true;
|
||||
DEBUG_WM(F("AutoConnect: ESP Already Connected"));
|
||||
setSTAConfig();
|
||||
}
|
||||
|
||||
if(connected || connectWifi("", "") == WL_CONNECTED){
|
||||
//connected
|
||||
DEBUG_WM(F("AutoConnect: SUCCESS"));
|
||||
DEBUG_WM(F("STA IP Address:"),WiFi.localIP());
|
||||
|
||||
Reference in New Issue
Block a user