diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 471af9b..f2189c2 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -593,7 +593,7 @@ void ip_ready_config_loaded_connecting_to_broker() { void onInitialStateInitLAN() { #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) #if defined(WIFI_MANAGER_DISABLE) - if(!wifiInitialized) { + if(WiFi.status() != WL_CONNECTED) { WiFi.mode(WIFI_STA); // ESP 32 - WiFi.disconnect(); instead debugSerial<