bilelmoussaoui / ashpd

A Rust wrapper around XDG portals DBus interfaces
https://bilelmoussaoui.github.io/ashpd/ashpd/
MIT License
242 stars 44 forks source link

Shutdown unix streams before dropping #237

Closed A6GibKm closed 2 weeks ago

A6GibKm commented 1 month ago

cc @SeaDve this fixes the issue in Bustle 0.9.

SeaDve commented 1 month ago

cc @SeaDve this fixes the issue in Bustle 0.9.

Interesting. Still, there's probably an issue somewhere, causing bustle/zbus to freeze but not bustle/dbus-monitor.

A6GibKm commented 1 month ago

I think shutdown will write the eof byte and we might be just waiting forever if it was not set. What i dont follow is that close should implicitly call shutdown.

A6GibKm commented 1 month ago

@SeaDve @bilelmoussaoui Could you please verify that this actually fixes the issue?

The reproducer is to call the retrieve method while bustle 0.9 (note that flathub is at 0.10) is recording the session bus.

bilelmoussaoui commented 1 month ago

@SeaDve @bilelmoussaoui Could you please verify that this actually fixes the issue?

The reproducer is to call the retrieve method while bustle 0.9 (note that flathub is at 0.10) is recording the session bus.

I have it on my todo list. will try to have a look the upcoming days

A6GibKm commented 2 weeks ago

Can confirm that this fixes the issues when tested with ASHPD demo (async-std) and Bustle on the commit before migrating to dbus-monitor and without this MR it does not work.