diff --git a/libraries/WiFi/src/WiFiSTA.cpp b/libraries/WiFi/src/WiFiSTA.cpp index 37ff5152..abb506b8 100644 --- a/libraries/WiFi/src/WiFiSTA.cpp +++ b/libraries/WiFi/src/WiFiSTA.cpp @@ -259,6 +259,7 @@ bool WiFiSTAClass::disconnect(bool wifioff) *conf.sta.ssid = 0; *conf.sta.password = 0; + WiFi.getMode(); esp_wifi_set_config(WIFI_IF_STA, &conf); ret = esp_wifi_set_config(WIFI_IF_STA, &conf) == ESP_OK;