Skip to content

Commit

Permalink
wifi disconnect if Warning log
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Jul 24, 2022
1 parent d0a779b commit ba2ded1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/web/WebStatusService.cpp
Expand Up @@ -34,7 +34,7 @@ WebStatusService::WebStatusService(AsyncWebServer * server, SecurityManager * se
void WebStatusService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) {
switch (event) {
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
EMSESP::logger().info(F("WiFi disconnected. Reason code=%d"), info.wifi_sta_disconnected.reason); // IDF 4.0
EMSESP::logger().warning(F("WiFi disconnected. Reason code=%d"), info.wifi_sta_disconnected.reason); // IDF 4.0
WiFi.disconnect(true);
break;

Expand Down Expand Up @@ -82,7 +82,7 @@ void WebStatusService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) {
break;

case ARDUINO_EVENT_ETH_DISCONNECTED:
EMSESP::logger().info(F("Ethernet disconnected"));
EMSESP::logger().warning(F("Ethernet disconnected"));
EMSESP::system_.ethernet_connected(false);
break;

Expand Down

0 comments on commit ba2ded1

Please sign in to comment.