mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
no wifi disconnect until reboot on ssid cleared
This commit is contained in:
@@ -28,10 +28,16 @@ void NetworkSettingsService::begin() {
|
||||
WiFi.onEvent(std::bind(&NetworkSettingsService::WiFiEvent, this, _1));
|
||||
|
||||
_fsPersistence.readFromFS();
|
||||
reconfigureWiFiConnection();
|
||||
// reconfigureWiFiConnection();
|
||||
_lastConnectionAttempt = 0;
|
||||
_stopping = false;
|
||||
}
|
||||
|
||||
void NetworkSettingsService::reconfigureWiFiConnection() {
|
||||
// do not disconnect for switching to eth, restart is needed
|
||||
if (WiFi.isConnected() && _state.ssid.length() == 0) {
|
||||
return;
|
||||
}
|
||||
// disconnect and de-configure wifi
|
||||
if (WiFi.disconnect(true)) {
|
||||
_stopping = true;
|
||||
|
||||
Reference in New Issue
Block a user