From 90083fcbb788bae5a67bc43752db4a80823fe06c Mon Sep 17 00:00:00 2001 From: wangjialiang Date: Thu, 27 Jan 2022 18:37:43 +0800 Subject: [PATCH] ble_mesh: stack: Bugfix the proxy client abnormal disconnection --- .../bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c b/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c index b29a7f2d8c..c7603f0647 100644 --- a/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c +++ b/components/bt/esp_ble_mesh/mesh_core/nimble_host/mesh_bearer_adapt.c @@ -539,7 +539,8 @@ static int disc_cb(struct ble_gap_event *event, void *arg) } } } else if (bt_mesh_gattc_info[i].service_uuid == BLE_MESH_UUID_MESH_PROXY_VAL) { - if (bt_mesh_gattc_conn_cb != NULL && bt_mesh_gattc_conn_cb->proxy_notify != NULL) { + if (bt_mesh_gattc_conn_cb != NULL && bt_mesh_gattc_conn_cb->proxy_notify != NULL && + bt_mesh_gattc_info[i].wr_desc_done) { len = bt_mesh_gattc_conn_cb->proxy_notify(&bt_mesh_gattc_info[i].conn, notif_data, notif_len); if (len < 0) {