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 _wait_removed completion on invalid object path #1544

Merged
merged 2 commits into from
Apr 28, 2024

Conversation

arthur-proglove
Copy link
Contributor

@arthur-proglove arthur-proglove commented Apr 25, 2024

The _wait_removed method registers the "InterfacesRemoved" callback on the adapter path of the device without checking which object was removed when called.
This means that any removed interface while a connection is being established can cause the _wait_removed to complete and cancel the connection.

This commit simply checks that the callback is for the proper device object path.

Fixes #1489

@arthur-proglove arthur-proglove force-pushed the fix/bluez_wait_removed branch from 7efd638 to 6e89203 Compare April 25, 2024 07:40
The _wait_removed method registers the "InterfacesRemoved" callback on
the adapter path of the device without checking which object was
removed when called.
This means that any removed interface while a connection is
being established can cause the _wait_removed to complete and cancel
the connection.

This commit simply checks that the callback is for the proper device
object path.

Fixes hbldh#1489
@arthur-proglove arthur-proglove force-pushed the fix/bluez_wait_removed branch from 6e89203 to b02c468 Compare April 25, 2024 07:41
CHANGELOG.rst Outdated Show resolved Hide resolved
@dlech dlech merged commit 5b44587 into hbldh:develop Apr 28, 2024
13 checks passed
@dlech
Copy link
Collaborator

dlech commented Apr 28, 2024

Nice one! Thanks a lot!

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

Successfully merging this pull request may close these issues.

bleak.exc.BleakError: failed to discover services, device disconnected
2 participants