Skip to content

Commit d869f39

Browse files
committed
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.
1 parent 438a70d commit d869f39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nimble/host/src/ble_hs_stop.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ ble_hs_stop_done(int status)
7171

7272
ble_hs_stop_hci_reset();
7373

74+
/* Clear advertising, scanning and connection states. */
75+
ble_gap_reset_state(0);
76+
7477
/* After LL reset the controller loses its random address */
7578
ble_hs_id_reset();
7679

7780
ble_hs_pvcy_reset();
7881

79-
/* Clear advertising, scanning and connection states. */
80-
ble_gap_reset_state(0);
81-
8282
ble_hs_unlock();
8383

8484
SLIST_FOREACH(listener, &slist, link) {

0 commit comments

Comments
 (0)