Fix WiFi disconnect event not being propageted. (#3085)

Relative to #3006
This commit is contained in:
Edoardo Odorico 2019-09-11 14:12:15 +02:00 committed by Me No Dev
parent 7fe2812f7f
commit cd4f9038ee

View File

@ -367,7 +367,7 @@ esp_err_t WiFiGenericClass::_eventCallback(void *arg, system_event_t *event)
(reason >= WIFI_REASON_BEACON_TIMEOUT && reason != WIFI_REASON_AUTH_FAIL)) && (reason >= WIFI_REASON_BEACON_TIMEOUT && reason != WIFI_REASON_AUTH_FAIL)) &&
WiFi.getAutoReconnect()) WiFi.getAutoReconnect())
{ {
WiFi.disconnect(true); WiFi.disconnect();
WiFi.begin(); WiFi.begin();
} }
} else if(event->event_id == SYSTEM_EVENT_STA_GOT_IP) { } else if(event->event_id == SYSTEM_EVENT_STA_GOT_IP) {