Skip to content

Commit 93b9cc3

Browse files
author
Veijo Pesonen
committed
Allow reinitialization if WDT reset occurs
1 parent f47b431 commit 93b9cc3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ESP8266/ESP8266.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,8 @@ void ESP8266::_oob_watchdog_reset()
840840
_sock_i[i].open = false;
841841
}
842842

843-
_conn_status = NSAPI_STATUS_DISCONNECTED;
843+
// Makes possible to reinitialize
844+
_conn_status = NSAPI_STATUS_ERROR_UNSUPPORTED;
844845
_conn_stat_cb();
845846
}
846847

ESP8266Interface.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,9 @@ void ESP8266Interface::update_conn_state_cb()
669669
case NSAPI_STATUS_LOCAL_UP:
670670
case NSAPI_STATUS_ERROR_UNSUPPORTED:
671671
default:
672-
MBED_ASSERT(false);
672+
_started = false;
673+
_initialized = false;
674+
_conn_stat = NSAPI_STATUS_DISCONNECTED;
673675
}
674676

675677
// Inform upper layers

0 commit comments

Comments
 (0)