Remove client delay calls and check if task is valid before notifying.

This commit is contained in:
h2zero
2021-01-12 13:54:53 -07:00
parent 740f280664
commit 09ff0c3472
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -174,7 +174,7 @@ void NimBLEDevice::stopAdvertising() {
}
while(pClient->isConnected()) {
vTaskDelay(10 / portTICK_PERIOD_MS);
taskYIELD();
}
} else if(pClient->m_pTaskData != nullptr) {
rc = ble_gap_conn_cancel();
@@ -182,7 +182,7 @@ void NimBLEDevice::stopAdvertising() {
return false;
}
while(pClient->m_pTaskData != nullptr) {
vTaskDelay(10 / portTICK_PERIOD_MS);
taskYIELD();
}
}