diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-08 01:46:13 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-07-08 02:39:35 +0800 |
commit | 42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68 (patch) | |
tree | 893b23f1c0a56b6e357030bfd4c8d45ebfbc89af | |
parent | 26ece7454d44593b406853da122da92c4daf53a2 (diff) | |
download | gsoc2013-evolution-42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68.tar gsoc2013-evolution-42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68.tar.gz gsoc2013-evolution-42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68.tar.bz2 gsoc2013-evolution-42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68.tar.lz gsoc2013-evolution-42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68.tar.xz gsoc2013-evolution-42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68.tar.zst gsoc2013-evolution-42b4f85ec5263c1715f5dfd01d0f3c289b8a9c68.zip |
network-manager: Recover from dropped D-Bus connections faster
-rw-r--r-- | modules/network-manager/evolution-network-manager.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/network-manager/evolution-network-manager.c b/modules/network-manager/evolution-network-manager.c index f1ab7853de..139847812b 100644 --- a/modules/network-manager/evolution-network-manager.c +++ b/modules/network-manager/evolution-network-manager.c @@ -70,16 +70,24 @@ network_manager_get_shell (ENetworkManager *extension) } static void -nm_connection_closed_cb (GDBusConnection *pconnection, +nm_connection_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, ENetworkManager *extension) { + gboolean try_again; + g_object_unref (extension->connection); extension->connection = NULL; - g_timeout_add_seconds ( - 3, (GSourceFunc) network_manager_connect, extension); + /* Try connecting to the session bus immediately, and then + * keep trying at 3 second intervals until we're back on. */ + + try_again = network_manager_connect (extension); + + if (try_again) + g_timeout_add_seconds ( + 3, (GSourceFunc) network_manager_connect, extension); } static void |