Fix race condition, connect->disconnect->discovery
This commit is contained in:
parent
00a3f84ea7
commit
d69a8e84fa
1 changed files with 3 additions and 1 deletions
|
@ -250,7 +250,9 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
|
|||
}
|
||||
|
||||
void NimbleController::StartDiscovery() {
|
||||
serviceDiscovery.StartDiscovery(connectionHandle);
|
||||
if (connectionHandle != BLE_HS_CONN_HANDLE_NONE) {
|
||||
serviceDiscovery.StartDiscovery(connectionHandle);
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t NimbleController::connHandle() {
|
||||
|
|
Loading…
Reference in a new issue