-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(macos): Break the corebluetooth loop when manager turned off
closes #387 In Core Bluetooth when the device is not applicable for background bluetooth manager will create an event for state change. And then change the manager state to power off. Currently, it is not tracked at all which leads to the forever stuck unresolved issues while the connection to peripheral is still held. An additional problem I faced that there is no way to manually kill the event loop of the corebluetooth from outside so the `CoreBluetoothInternal::drop` is never called because it is always living in the stalled thread. In this change, I added an API to access the manager state and exited the event loop when if the manager turned off.
- Loading branch information
1 parent
1937ff5
commit 60d00ca
Showing
3 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters