Fix issue with semaphores (#2974)

This commit is contained in:
chegewara
2019-07-10 08:11:35 +02:00
committed by Me No Dev
parent d5fdd715ef
commit d1134fd45e
3 changed files with 3 additions and 5 deletions

View File

@ -184,10 +184,11 @@ void BLEClient::gattClientEventHandler(
if (m_pClientCallbacks != nullptr) {
m_pClientCallbacks->onDisconnect(this);
}
BLEDevice::removePeerDevice(m_appId, true);
esp_ble_gattc_app_unregister(m_gattc_if);
m_semaphoreOpenEvt.give(ESP_GATT_IF_NONE);
m_semaphoreRssiCmplEvt.give();
m_semaphoreSearchCmplEvt.give(1);
BLEDevice::removePeerDevice(m_appId, true);
break;
} // ESP_GATTC_DISCONNECT_EVT