Skip to content

Commit a180d69

Browse files
authored
Merge pull request #9356 from VeijoPesonen/bugfix-esp8266_disconnect_return_code
ESP8266 - fixes disconnect to check the state from modem
2 parents 2896c12 + e83b883 commit a180d69

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)