mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-23 15:36:14 +02:00
Completely reset connection state on fail
This commit is contained in:
parent
be31f417db
commit
00a3f84ea7
|
@ -159,6 +159,9 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
|
|||
|
||||
if (event->connect.status != 0) {
|
||||
/* Connection failed; resume advertising. */
|
||||
currentTimeClient.Reset();
|
||||
alertNotificationClient.Reset();
|
||||
connectionHandle = BLE_HS_CONN_HANDLE_NONE;
|
||||
bleController.Disconnect();
|
||||
StartAdvertising();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue