BLE: Queue address resolution in event queue to avoid synchronous execution

Otherwise when no IRK are available, the process will execute synchronously, calling the callback before the return of the function.
pull/13759/head
Vincent Coubard 2020-09-23 11:02:00 +01:00
parent dee20fe5a7
commit 1daee237e9
1 changed files with 4 additions and 1 deletions

View File

@ -541,7 +541,10 @@ ble_error_t PrivateAddressController::queue_resolve_address(const address_t &pee
return BLE_ERROR_NO_MEM;
}
queue_privacy_control_block(cb);
_event_queue.post([this, cb] {
queue_privacy_control_block(cb);
});
return BLE_ERROR_NONE;
}