Skip to content

Commit

Permalink
Fix issue #3522 (WiFi does not restart after stopped) (#4114)
Browse files Browse the repository at this point in the history
This commit fixes issue #3522 where WiFi service fails to start after a WiFi.disconnect(true) or a WiFi.mode(WIFI_OFF).
  • Loading branch information
mouridis committed Sep 30, 2020
1 parent 494061a commit 80e9e42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/WiFi/src/WiFiGeneric.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 80e9e42

Please sign in to comment.