Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4ac71d2

Browse files
authoredNov 2, 2022
[BLE Client] Fix deadlock if connection loss ... (#7319)
... while readValue
1 parent c8da793 commit 4ac71d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎libraries/BLE/src/BLERemoteCharacteristic.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ void BLERemoteCharacteristic::gattClientEventHandler(esp_gattc_cb_event_t event,
247247
break;
248248

249249
case ESP_GATTC_DISCONNECT_EVT:
250+
// Cleanup semaphores to avoid deadlocks.
251+
m_semaphoreReadCharEvt.give(1);
250252
m_semaphoreWriteCharEvt.give(1);
251253
break;
252254

0 commit comments

Comments
 (0)
Please sign in to comment.