Make sure send the reply of method IBus.Exit out before the daemon exits.
authorPeng Huang <shawn.p.huang@gmail.com>
Tue, 16 Nov 2010 05:22:23 +0000 (14:22 +0900)
committerPeng Huang <shawn.p.huang@gmail.com>
Tue, 16 Nov 2010 05:22:23 +0000 (14:22 +0900)
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3133041

bus/ibusimpl.c

index 843f1a3..e393a45 100644 (file)
@@ -1295,6 +1295,10 @@ _ibus_exit (BusIBusImpl     *ibus,
 
     g_dbus_method_invocation_return_value (invocation, NULL);
 
+    /* Make sure the reply has been sent out before exit */
+    g_dbus_connection_flush_sync (g_dbus_method_invocation_get_connection (invocation),
+                                  NULL,
+                                  NULL);
     bus_server_quit ();
 
     if (!restart) {