mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10462 from michalpasztamobica/nanostack_semaphore_release_connecting
Nanostack: release connect_semaphore only when it is pendingpull/10503/head
commit
1647282de9
|
|
@ -120,8 +120,9 @@ nsapi_error_t MeshInterfaceNanostack::initialize(NanostackRfPhy *phy)
|
|||
void Nanostack::Interface::network_handler(mesh_connection_status_t status)
|
||||
{
|
||||
if (_blocking) {
|
||||
if (status == MESH_CONNECTED || status == MESH_CONNECTED_LOCAL ||
|
||||
status == MESH_CONNECTED_GLOBAL) {
|
||||
if (_connect_status == NSAPI_STATUS_CONNECTING
|
||||
&& (status == MESH_CONNECTED || status == MESH_CONNECTED_LOCAL
|
||||
|| status == MESH_CONNECTED_GLOBAL)) {
|
||||
connect_semaphore.release();
|
||||
} else if (status == MESH_DISCONNECTED) {
|
||||
disconnect_semaphore.release();
|
||||
|
|
|
|||
Loading…
Reference in New Issue