From 52cfff707f44a7e0cf255f5ecaa95b3463d69fc3 Mon Sep 17 00:00:00 2001 From: luoxu Date: Tue, 30 Jun 2026 11:53:02 +0800 Subject: [PATCH] fix(ble_mesh): fixed invalid disconnect handler wrote --- components/bt/esp_ble_mesh/core/nimble_host/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/core/nimble_host/adapter.c b/components/bt/esp_ble_mesh/core/nimble_host/adapter.c index b634d3befd2..6e1cda17b56 100644 --- a/components/bt/esp_ble_mesh/core/nimble_host/adapter.c +++ b/components/bt/esp_ble_mesh/core/nimble_host/adapter.c @@ -956,10 +956,10 @@ static int gap_event_cb(struct ble_gap_event *event, void *arg) if (index != -ENODEV) { bt_mesh_gatts_conn[index].handle = BLE_MESH_GATT_GET_CONN_ID(event->disconnect.conn.conn_handle); (bt_mesh_gatts_conn_cb->disconnected)(&bt_mesh_gatts_conn[index], event->disconnect.reason); + bt_mesh_gatts_conn[index].handle = BT_MESH_GATTS_CONN_UNUSED; } else { BT_ERR("No device"); } - bt_mesh_gatts_conn[index].handle = BT_MESH_GATTS_CONN_UNUSED; memset(bt_mesh_gatts_addr, 0x0, BLE_MESH_ADDR_LEN); }