Skip to content

Commit 00a3f84

Browse files
committed
Completely reset connection state on fail
1 parent be31f41 commit 00a3f84

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/components/ble/NimbleController.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
159159

160160
if (event->connect.status != 0) {
161161
/* Connection failed; resume advertising. */
162+
currentTimeClient.Reset();
163+
alertNotificationClient.Reset();
164+
connectionHandle = BLE_HS_CONN_HANDLE_NONE;
162165
bleController.Disconnect();
163166
StartAdvertising();
164167
} else {

0 commit comments

Comments
 (0)