From 54a87acce82b1a872e3539559d4e92743e476bac Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Wed, 2 Apr 2025 10:16:18 +0530 Subject: [PATCH] fix(nimble): Fixed one missing ble_hs_unlock() --- nimble/host/src/ble_gap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index dfa85488f..82cab68c7 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -2055,13 +2055,17 @@ ble_gap_rx_peroidic_adv_sync_estab(const struct ble_hci_ev_le_subev_periodic_adv } ble_conn_reattempt.count += 1; ble_conn_reattempt.sync_reattempt = 1; + + ble_hs_unlock(); + rc = ble_gap_periodic_adv_sync_create(&ble_conn_reattempt.periodic_addr, ble_conn_reattempt.adv_sid, &ble_conn_reattempt.periodic_params, ble_conn_reattempt.cb, ble_conn_reattempt.cb_arg); if (rc != 0) { - ble_hs_unlock(); return; } + + ble_hs_lock(); } } #endif