Skip to content

Commit 4365a45

Browse files
committed
Fix WiFi Deinit bug
Fixes: #4842
1 parent 023ae75 commit 4365a45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: libraries/WiFi/src/WiFiGeneric.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,9 @@ bool wifiLowLevelInit(bool persistent){
577577

578578
static bool wifiLowLevelDeinit(){
579579
if(lowLevelInitDone){
580-
lowLevelInitDone = esp_wifi_deinit() == ESP_OK;
580+
lowLevelInitDone = !(esp_wifi_deinit() == ESP_OK);
581581
}
582-
return true;
582+
return !lowLevelInitDone;
583583
}
584584

585585
static bool _esp_wifi_started = false;

0 commit comments

Comments
 (0)