Unverified Commit 80e9e42c authored by Nikos Mouratidis's avatar Nikos Mouratidis Committed by GitHub

Fix issue #3522 (WiFi does not restart after stopped) (#4114)

This commit fixes issue https://github.com/espressif/arduino-esp32/issues/3522 where WiFi service fails to start after a WiFi.disconnect(true) or a WiFi.mode(WIFI_OFF).
parent 494061af
......@@ -574,7 +574,7 @@ bool WiFiGenericClass::mode(wifi_mode_t m)
*/
wifi_mode_t WiFiGenericClass::getMode()
{
if(!lowLevelInitDone){
if(!lowLevelInitDone || !_esp_wifi_started){
return WIFI_MODE_NULL;
}
wifi_mode_t mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment