Skip to content

Commit e83b883

Browse files
author
Veijo Pesonen
committed
[ESP8266] fixes disconnect to check the state from modem
Additionally to internal bookkeeping lets check from the modem that what is connection state in disconnect. There might be inconsistencies.
1 parent 28d5477 commit e83b883

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/wifi/esp8266-driver/ESP8266Interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ int ESP8266Interface::disconnect()
246246
{
247247
_initialized = false;
248248

249-
if (_conn_stat == NSAPI_STATUS_DISCONNECTED)
249+
if (_conn_stat == NSAPI_STATUS_DISCONNECTED || !get_ip_address())
250250
{
251251
return NSAPI_ERROR_NO_CONNECTION;
252252
}

0 commit comments

Comments
 (0)