Make AdvertiseManager shutdown gracefully
If the Bluetooth stack is shutdown while AdvertiseManager has a pending HCI operation being executed, the callback to that operation might be executed after the manager was deleted. In order to fix any potential issues, always use a weak pointer to the advertisement manager. This will prevent the callbacks from getting executed. In case of callbacks that are not executed on the AdvertiseManager instance, one can check if the weak pointer is still valid, and properly handle the stack shutdown. Test: BleAdvertisingManagerTest:test_cleanup_during_execution Change-Id: I8d33de4f64267a880880082c5498375c083addef
Loading
Please register or sign in to comment