Skip to content

Conversation

@szymonlesisz
Copy link
Contributor

when device is upaired from the system settings while connected CentralEvent::DeviceDisconnected is never emitted.
it fails on line:

let device = session.get_device_info(&id).await.ok()?;

with error:

Err(DbusError(D-Bus error: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist

Screenshot from 2025-10-22 13-58-48

Some(CentralEvent::DeviceDisconnected(id.into()))
} else {
Some(CentralEvent::DeviceDisconnected(device.id.into()))
// unexpected state. connected without device_info
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this ever happen? If not, could we could skip the get_device_info call entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

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?

@szymonlesisz szymonlesisz force-pushed the fix/bluez-device-disconnection branch from 5ea27d3 to b8d3545 Compare October 22, 2025 12:40
@qwandor qwandor merged commit d91a54c into deviceplug:dev Oct 22, 2025
5 checks passed
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.

2 participants