Fix task not released when not exchanging MTU.

This commit is contained in:
h2zero 2024-11-26 14:19:26 -07:00 committed by h2zero
parent 4a57432a47
commit 52291390fa

View file

@ -987,6 +987,8 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
rc = pClient->m_lastErr; // sets the error in the task data
break;
}
return 0; // return as we may have a task waiting for the MTU before releasing it.
}
} else {
pClient->m_connHandle = BLE_HS_CONN_HANDLE_NONE;
@ -997,11 +999,9 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
NimBLEDevice::deleteClient(pClient);
}
}
break;
}
return 0;
break;
} // BLE_GAP_EVENT_CONNECT
case BLE_GAP_EVENT_TERM_FAILURE: {