mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 12:17:14 -06:00
A desktop portal older than 0.9 ignores handle_token and answers on a request path of its own. save_file subscribed to that path only after SaveFile returned it. zbus makes three bus round trips to set up that subscription. A Response that arrived during them was dropped, and the save waited forever. On CI the test the_answer_is_awaited_on_the_path_the_portal_returns waited until the job limit. save_file now makes one stream for every Response from the portal before it calls SaveFile, and takes the first Response whose path is the returned handle and whose sender is the connection that sent the reply. A Response that comes before the reply stays queued in the stream. The mock portal now creates its message stream before it starts its thread and before the client connects, so a SaveFile call that arrives before the thread runs is no longer dropped. A new mode sends the Response before the reply, and the D-Bus tests fail after 30 seconds instead of waiting without end.