[BLE Client] Fix deadlock if connection loss ... (#7319)
... while readValue
This commit is contained in:
parent
c8da793c95
commit
4ac71d2a7f
1 changed files with 2 additions and 0 deletions
|
|
@ -247,6 +247,8 @@ void BLERemoteCharacteristic::gattClientEventHandler(esp_gattc_cb_event_t event,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESP_GATTC_DISCONNECT_EVT:
|
case ESP_GATTC_DISCONNECT_EVT:
|
||||||
|
// Cleanup semaphores to avoid deadlocks.
|
||||||
|
m_semaphoreReadCharEvt.give(1);
|
||||||
m_semaphoreWriteCharEvt.give(1);
|
m_semaphoreWriteCharEvt.give(1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue