fix: bluez device disconnection#446
Merged
qwandor merged 1 commit intodeviceplug:devfrom Oct 22, 2025
Merged
Conversation
qwandor
reviewed
Oct 22, 2025
src/bluez/adapter.rs
Outdated
| Some(CentralEvent::DeviceDisconnected(id.into())) | ||
| } else { | ||
| Some(CentralEvent::DeviceDisconnected(device.id.into())) | ||
| // unexpected state. connected without device_info |
Collaborator
There was a problem hiding this comment.
Does this ever happen? If not, could we could skip the get_device_info call entirely?
Contributor
Author
There was a problem hiding this comment.
yes, i was thinking about it but wasnt sure if skipping get_device_info affects some inner state of bluez_async or local, but seems its safe to skip it in this case 👍
btw, this code is done in each other case (calling get_device_info just to use its id) - so maybe there is some other reason for this
rebased, forcepushed
Collaborator
There was a problem hiding this comment.
It shouldn't affect any state, so I'm not sure why that's ended up here. Maybe we were using something else from it in the past?
5ea27d3 to
b8d3545
Compare
qwandor
approved these changes
Oct 22, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when device is upaired from the system settings while connected
CentralEvent::DeviceDisconnectedis never emitted.it fails on line:
with error:
Err(DbusError(D-Bus error: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist