dbus2 / zbus-old

Rust D-Bus crate.
https://gitlab.freedesktop.org/dbus/zbus
Other
49 stars 13 forks source link

drop(connection) doesn't close the connection #318

Closed zeenix closed 1 year ago

zeenix commented 1 year ago

In GitLab by @peelz on Jan 31, 2023, 01:58

As the title says, calling drop(connection) doesn't close the connection.

zbus-wont-disconnect

Reproduction: https://github.com/notpeelz/bug-repro-zbus-drop-doesnt-disconnect

zeenix commented 1 year ago

mentioned in commit zeenix/zbus@9ef22e39154c9a9f1cc61266952adf976e10638a

zeenix commented 1 year ago

I'm pretty sure this is a recent(ish) regression. I created a testcase for it so once it's fixed, we can avoid this regression in the future. What I already found out is that it's the ObjectServer setup that ends up cloning the connection so the drop isn't dropping the actual internal state.

zeenix commented 1 year ago

mentioned in commit zeenix/zbus@b95f9d68c44fcbcce556bd6bd39818897141d240

zeenix commented 1 year ago

The actual fix was trivial in the end but it took a while to get to it. :)