forked from h2zero/esp-nimble-cpp
NimBLEDevice::onSync should call taskYIELD() before returning.
This change is needed to allow any tasks that were stopped during a host reset to finish before resuming from the re-sync. This would occasionally result in a LoadStoreError exception if not done.
This commit is contained in:
@ -446,6 +446,10 @@ void NimBLEDevice::stopAdvertising() {
|
||||
int rc = ble_hs_util_ensure_addr(0);
|
||||
assert(rc == 0);
|
||||
|
||||
// Yield for houskeeping before returning to operations.
|
||||
// Occasionally triggers exception without.
|
||||
taskYIELD();
|
||||
|
||||
m_synced = true;
|
||||
|
||||
if(initialized) {
|
||||
|
Reference in New Issue
Block a user