mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2026-01-28 01:52:27 +01:00
Fix NimBLEClient::secureConnection incorrectly failing with BLE_HS_EAGAIN.
This commit is contained in:
@@ -302,9 +302,8 @@ bool NimBLEClient::secureConnection() const {
|
||||
do {
|
||||
m_pTaskData = &taskData;
|
||||
|
||||
int rc = NimBLEDevice::startSecurity(m_connHandle);
|
||||
if (rc != 0 && rc != BLE_HS_EALREADY) {
|
||||
m_lastErr = rc;
|
||||
if (!NimBLEDevice::startSecurity(m_connHandle)) {
|
||||
m_lastErr = BLE_HS_ENOTCONN;
|
||||
m_pTaskData = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user