mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-22 05:00:55 +01:00
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:
parent
4f4883d6ba
commit
b807321d1b
1 changed files with 4 additions and 0 deletions
|
@ -446,6 +446,10 @@ void NimBLEDevice::stopAdvertising() {
|
||||||
int rc = ble_hs_util_ensure_addr(0);
|
int rc = ble_hs_util_ensure_addr(0);
|
||||||
assert(rc == 0);
|
assert(rc == 0);
|
||||||
|
|
||||||
|
// Yield for houskeeping before returning to operations.
|
||||||
|
// Occasionally triggers exception without.
|
||||||
|
taskYIELD();
|
||||||
|
|
||||||
m_synced = true;
|
m_synced = true;
|
||||||
|
|
||||||
if(initialized) {
|
if(initialized) {
|
||||||
|
|
Loading…
Reference in a new issue