Skip to content

Commit

Permalink
[WiFi] Perform wifi disconnect on disconnect event.
Browse files Browse the repository at this point in the history
  • Loading branch information
TD-er committed Apr 3, 2019
1 parent 118e09b commit b14d5bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ESPEasyWiFiEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ void onDisconnect(const WiFiEventStationModeDisconnected& event){
}
lastDisconnectReason = event.reason;
wifiStatus = ESPEASY_WIFI_DISCONNECTED;
if (WiFi.status() == WL_CONNECTED) {
// See https://github.com/esp8266/Arduino/issues/5912
WiFi.disconnect();
}
processedDisconnect = false;
}

Expand Down

0 comments on commit b14d5bf

Please sign in to comment.