Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4365a45

Browse files
committedAug 2, 2021
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
 

‎libraries/WiFi/src/WiFiGeneric.cpp

Lines changed: 2 additions & 2 deletions
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)
Please sign in to comment.