mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9356 from VeijoPesonen/bugfix-esp8266_disconnect_return_code
ESP8266 - fixes disconnect to check the state from modempull/9288/head
commit
a180d69e60
|
@ -246,7 +246,7 @@ int ESP8266Interface::disconnect()
|
|||
{
|
||||
_initialized = false;
|
||||
|
||||
if (_conn_stat == NSAPI_STATUS_DISCONNECTED)
|
||||
if (_conn_stat == NSAPI_STATUS_DISCONNECTED || !get_ip_address())
|
||||
{
|
||||
return NSAPI_ERROR_NO_CONNECTION;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue