Fix WiFi Deinit bug

Fixes: https://github.com/espressif/arduino-esp32/issues/4842
This commit is contained in:
me-no-dev 2021-08-02 14:57:55 +03:00
parent 023ae75b97
commit 4365a45401

View File

@ -577,9 +577,9 @@ bool wifiLowLevelInit(bool persistent){
static bool wifiLowLevelDeinit(){
if(lowLevelInitDone){
lowLevelInitDone = esp_wifi_deinit() == ESP_OK;
lowLevelInitDone = !(esp_wifi_deinit() == ESP_OK);
}
return true;
return !lowLevelInitDone;
}
static bool _esp_wifi_started = false;