diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-08 01:46:13 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:35 +0800 |
commit | ae5c5a6e58866e07801c8dec22b8994f6b1348c4 (patch) | |
tree | 5dc130c6976009cec2555d7fcecb720a939531d4 /modules | |
parent | 41b43f2e962ed9c19c70e3d336398cdc9f900fc9 (diff) | |
download | gsoc2013-evolution-ae5c5a6e58866e07801c8dec22b8994f6b1348c4.tar gsoc2013-evolution-ae5c5a6e58866e07801c8dec22b8994f6b1348c4.tar.gz gsoc2013-evolution-ae5c5a6e58866e07801c8dec22b8994f6b1348c4.tar.bz2 gsoc2013-evolution-ae5c5a6e58866e07801c8dec22b8994f6b1348c4.tar.lz gsoc2013-evolution-ae5c5a6e58866e07801c8dec22b8994f6b1348c4.tar.xz gsoc2013-evolution-ae5c5a6e58866e07801c8dec22b8994f6b1348c4.tar.zst gsoc2013-evolution-ae5c5a6e58866e07801c8dec22b8994f6b1348c4.zip |
network-manager: Recover from dropped D-Bus connections faster
Diffstat (limited to 'modules')
-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 |