Make sure WiFi is initialized in disconnect.

Fixes: https://github.com/espressif/arduino-esp32/issues/400
This commit is contained in:
me-no-dev 2017-05-29 13:12:42 +03:00
parent 5d92784710
commit 0e513f3a4b

View File

@ -259,6 +259,7 @@ bool WiFiSTAClass::disconnect(bool wifioff)
*conf.sta.ssid = 0;
*conf.sta.password = 0;
WiFi.getMode();
esp_wifi_set_config(WIFI_IF_STA, &conf);
ret = esp_wifi_set_config(WIFI_IF_STA, &conf) == ESP_OK;