Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(macos): Break the corebluetooth loop when manager turned off #388

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Commits on May 24, 2024

  1. fix(macos): Break the corebluetooth loop when manager turned off

    closes deviceplug#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.
    dmtrKovalenko committed May 24, 2024
    Configuration menu
    Copy the full SHA
    a0635d7 View commit details
    Browse the repository at this point in the history