mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-28 08:00:55 +01:00
Fix task not released when not exchanging MTU.
This commit is contained in:
parent
4a57432a47
commit
52291390fa
1 changed files with 3 additions and 3 deletions
|
@ -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
|
rc = pClient->m_lastErr; // sets the error in the task data
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0; // return as we may have a task waiting for the MTU before releasing it.
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pClient->m_connHandle = BLE_HS_CONN_HANDLE_NONE;
|
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);
|
NimBLEDevice::deleteClient(pClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
break;
|
||||||
} // BLE_GAP_EVENT_CONNECT
|
} // BLE_GAP_EVENT_CONNECT
|
||||||
|
|
||||||
case BLE_GAP_EVENT_TERM_FAILURE: {
|
case BLE_GAP_EVENT_TERM_FAILURE: {
|
||||||
|
|
Loading…
Reference in a new issue