[unique] dbus: Set default timeout to 3 seconds



commit 642bbc9c5ee87a988ed6c1809a22e4915d6d93f6
Author: Bill Nottingham <notting redhat com>
Date:   Sat Mar 26 18:54:28 2011 +0000

    dbus: Set default timeout to 3 seconds
    
    1. Start a unique app (say, empathy)
    2. Make it unresponsive (SIGSTOP is the easy way)
    3. Start it again
    4. ... 30 seconds passes ...
    
    (empathy:9853): Unique-DBus-WARNING **: Error while sending message: Did
    not receive a reply. Possible causes include: the remote application did
    not send a reply, the message bus security policy blocked the reply, the
    reply timeout expired, or the network connection was broken.
    
    The timeout really should be tamped down here, perhaps to a couple of
    seconds... realistically, if the app isn't responding at that point,
    it's not going to.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629781
    
    Signed-off-by: Emmanuele Bassi <ebassi linux intel com>

 unique/dbus/uniquebackend-dbus.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/unique/dbus/uniquebackend-dbus.c b/unique/dbus/uniquebackend-dbus.c
index 3ae1bed..cbb7258 100644
--- a/unique/dbus/uniquebackend-dbus.c
+++ b/unique/dbus/uniquebackend-dbus.c
@@ -77,7 +77,10 @@ unique_backend_dbus_register_proxy (UniqueBackendDBus *backend_dbus)
   backend_dbus->proxy = dbus_g_proxy_new_for_name (connection, name,
                                                    "/Factory",
                                                    "org.gtk.UniqueApp");
-  
+
+  /* do not wait for the default 30 seconds timeout */
+  dbus_g_proxy_set_default_timeout (backend_dbus->proxy, 3000);
+
   return (backend_dbus->proxy != NULL);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]