crvi / rpms / rhythmbox

Forked from rpms/rhythmbox 3 years ago
Clone
Blob Blame History Raw
From 47e4658d61c986ef8f1601a046a55736cd25b20a Mon Sep 17 00:00:00 2001
From: crvi <crvisqr@gmail.com>
Date: Tue, 5 Jan 2021 20:47:54 +0530
Subject: [PATCH] rhythmbox-client: flush dbus connection to send the 'quit'
 message before process exit

This was an issue in single core / uniprocessor / VMs, where
rhythmbox-client process exits due to 'exit()' call, before the 'quit'
message is sent to the rhythmbox instance.

Also refer: https://gitlab.gnome.org/GNOME/glib/-/issues/2284
---
 remote/dbus/rb-client.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/remote/dbus/rb-client.c b/remote/dbus/rb-client.c
index 338b26d15..fe57eef82 100644
--- a/remote/dbus/rb-client.c
+++ b/remote/dbus/rb-client.c
@@ -1165,6 +1165,7 @@ main (int argc, char **argv)
 	if (quit) {
 		rb_debug ("quitting existing instance");
 		g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
+		g_dbus_connection_flush_sync (bus, NULL, NULL);
 		exit (0);
 	}
 
-- 
GitLab