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:
h2zero 2021-01-12 13:59:49 -07:00
parent 4f4883d6ba
commit b807321d1b

View file

@ -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) {