mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-12-20 08:12:01 +03:00
Fix race condition, connect->disconnect->discovery
This commit is contained in:
parent
00a3f84ea7
commit
d69a8e84fa
@ -250,8 +250,10 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NimbleController::StartDiscovery() {
|
void NimbleController::StartDiscovery() {
|
||||||
|
if (connectionHandle != BLE_HS_CONN_HANDLE_NONE) {
|
||||||
serviceDiscovery.StartDiscovery(connectionHandle);
|
serviceDiscovery.StartDiscovery(connectionHandle);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint16_t NimbleController::connHandle() {
|
uint16_t NimbleController::connHandle() {
|
||||||
return connectionHandle;
|
return connectionHandle;
|
||||||
|
Loading…
Reference in New Issue
Block a user