mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10434 from michalpasztamobica/nanostack_network_handler_fix
Nanostack network handle does not always call status cb for BOOTSTRAP eventspull/10503/head
commit
016ce322b4
|
@ -149,8 +149,9 @@ void Nanostack::Interface::network_handler(mesh_connection_status_t status)
|
|||
_connect_status = NSAPI_STATUS_DISCONNECTED;
|
||||
}
|
||||
|
||||
if (_connection_status_cb && _previous_connection_status != _connect_status) {
|
||||
|
||||
if (_connection_status_cb && _previous_connection_status != _connect_status
|
||||
&& (_previous_connection_status != NSAPI_STATUS_GLOBAL_UP || status != MESH_BOOTSTRAP_STARTED)
|
||||
&& (_previous_connection_status != NSAPI_STATUS_CONNECTING || status != MESH_BOOTSTRAP_START_FAILED)) {
|
||||
_connection_status_cb(NSAPI_EVENT_CONNECTION_STATUS_CHANGE, _connect_status);
|
||||
}
|
||||
_previous_connection_status = _connect_status;
|
||||
|
|
Loading…
Reference in New Issue