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

bluez/client: move state management to global BlueZ manager #902

Merged
merged 3 commits into from
Jul 29, 2022

Conversation

dlech
Copy link
Collaborator

@dlech dlech commented Jul 26, 2022

This fixes a number of bugs by moving the BleakClient state management to the new global BlueZ manager object.

This fixes a number of bugs by moving the `BleakClient` state management
to the new global BlueZ manager object.

- Calling "GetManagedObjects" each time we connected caused performance
  issues. Fixes #500.
- Calling "ConnectDevice" didn't work as expected and has been removed/
  Fixes #806.
- BleakClient didn't handle "InterfacesRemoved" which resulted in an
  invalid service dictionary in some cases. Fixes #882.
This works around a bug in the dbus_next library where the socket is
not closed on disconnect.

Fixes #805.
@dlech
Copy link
Collaborator Author

dlech commented Jul 26, 2022

I also added an addition commit that fixes leaking file descriptors since we couldn't remove the separate D-Bus socket completely. Fixes #805.

@dlech dlech linked an issue Jul 26, 2022 that may be closed by this pull request
Copy link
Contributor

@bdraco bdraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and working as expected for Home Assistant 👍

@projectgus
Copy link
Contributor

Thanks for this patch. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants