Skip to content

Commit 1daee23

Browse files
committed
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.
1 parent dee20fe commit 1daee23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

connectivity/FEATURE_BLE/source/generic/PrivateAddressController.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,10 @@ ble_error_t PrivateAddressController::queue_resolve_address(const address_t &pee
541541
return BLE_ERROR_NO_MEM;
542542
}
543543

544-
queue_privacy_control_block(cb);
544+
_event_queue.post([this, cb] {
545+
queue_privacy_control_block(cb);
546+
});
547+
545548
return BLE_ERROR_NONE;
546549
}
547550

0 commit comments

Comments
 (0)