Skip to content

Commit 03c1e9c

Browse files
committed
Fix task not released when not exchanging MTU.
1 parent 7dc7194 commit 03c1e9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/NimBLEClient.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,8 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
987987
rc = pClient->m_lastErr; // sets the error in the task data
988988
break;
989989
}
990+
991+
return 0; // return as we may have a task waiting for the MTU before releasing it.
990992
}
991993
} else {
992994
pClient->m_connHandle = BLE_HS_CONN_HANDLE_NONE;
@@ -997,11 +999,9 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
997999
NimBLEDevice::deleteClient(pClient);
9981000
}
9991001
}
1000-
1001-
break;
10021002
}
10031003

1004-
return 0;
1004+
break;
10051005
} // BLE_GAP_EVENT_CONNECT
10061006

10071007
case BLE_GAP_EVENT_TERM_FAILURE: {

0 commit comments

Comments
 (0)