Skip to content

Commit 4ac71d2

Browse files
authored
[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

Diff for: libraries/BLE/src/BLERemoteCharacteristic.cpp

+2
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)