This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new d869f3978 nimble/host: Fix stopping host with pending connections
d869f3978 is described below
commit d869f39783892efb9e4c21a35ce434e7b1834826
Author: Szymon Janc <[email protected]>
AuthorDate: Thu Jul 31 17:24:54 2025 +0200
nimble/host: Fix stopping host with pending connections
ble_gap_reset_state() may stil require valid local(own) addresses.
So ID and RPAs should be cleaned only after that.
---
nimble/host/src/ble_hs_stop.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nimble/host/src/ble_hs_stop.c b/nimble/host/src/ble_hs_stop.c
index 6d5c36d8f..c0ff67e45 100644
--- a/nimble/host/src/ble_hs_stop.c
+++ b/nimble/host/src/ble_hs_stop.c
@@ -71,14 +71,14 @@ ble_hs_stop_done(int status)
ble_hs_stop_hci_reset();
+ /* Clear advertising, scanning and connection states. */
+ ble_gap_reset_state(0);
+
/* After LL reset the controller loses its random address */
ble_hs_id_reset();
ble_hs_pvcy_reset();
- /* Clear advertising, scanning and connection states. */
- ble_gap_reset_state(0);
-
ble_hs_unlock();
SLIST_FOREACH(listener, &slist, link) {