fix issue 1081 and 1086 Wifi connection error when using STATIC IP settings (#1129)

This commit is contained in:
Marco Tombesi 2018-03-04 21:05:24 +01:00 committed by Me No Dev
parent e2f7736cf0
commit bb8b255429

View File

@ -316,7 +316,9 @@ esp_err_t WiFiGenericClass::_eventCallback(void *arg, system_event_t *event)
} else if(event->event_id == SYSTEM_EVENT_STA_CONNECTED) { } else if(event->event_id == SYSTEM_EVENT_STA_CONNECTED) {
WiFiSTAClass::_setStatus(WL_IDLE_STATUS); WiFiSTAClass::_setStatus(WL_IDLE_STATUS);
} else if(event->event_id == SYSTEM_EVENT_STA_GOT_IP) { } else if(event->event_id == SYSTEM_EVENT_STA_GOT_IP) {
if(WiFiSTAClass::status() == WL_IDLE_STATUS) { //#1081 https://github.com/espressif/arduino-esp32/issues/1081
// if(WiFiSTAClass::status() == WL_IDLE_STATUS)
{
WiFiSTAClass::_setStatus(WL_CONNECTED); WiFiSTAClass::_setStatus(WL_CONNECTED);
} }
} }