mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-05 21:04:49 +00:00
fix(nimble): delete connection after lookup in ble_gap_conn_broken
This commit is contained in:
@@ -1693,8 +1693,6 @@ ble_gap_conn_broken(uint16_t conn_handle, int reason)
|
||||
ble_gap_event_connect_call(conn_handle, BLE_HS_EAGAIN);
|
||||
}
|
||||
|
||||
ble_hs_atomic_conn_delete(conn_handle);
|
||||
|
||||
ble_hs_lock();
|
||||
conn = ble_hs_conn_find(conn_handle);
|
||||
if (conn != NULL) {
|
||||
@@ -1705,6 +1703,8 @@ ble_gap_conn_broken(uint16_t conn_handle, int reason)
|
||||
}
|
||||
ble_hs_unlock();
|
||||
|
||||
ble_hs_atomic_conn_delete(conn_handle);
|
||||
|
||||
event.type = BLE_GAP_EVENT_DISCONNECT;
|
||||
event.disconnect.reason = reason;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user