Merge pull request #9356 from VeijoPesonen/bugfix-esp8266_disconnect_return_code

ESP8266 - fixes disconnect to check the state from modem
pull/9288/head
Martin Kojtal 2019-01-15 10:38:40 +01:00 committed by GitHub
commit a180d69e60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}