From b6ac5c857886bf5d2a9dd992b9c78adde0425a92 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 14 Nov 2007 11:52:46 +0000 Subject: Try to reconnect Gabble if initial attempt failed (#4907) --- diff --git a/NEWS b/NEWS index af2d697..dd4b1cf 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +* #4907: Try to reconnect Gabble if initial attempt failed (cassidy) + Snapshot 89c33bcf93 * #4660: Fix regression when sharing an activity (cassidy) diff --git a/src/telepathy_plugin.py b/src/telepathy_plugin.py index b0bbf46..1a10c29 100644 --- a/src/telepathy_plugin.py +++ b/src/telepathy_plugin.py @@ -216,6 +216,7 @@ class TelepathyPlugin(gobject.GObject): gobject.source_remove(self._backoff_id) self._backoff_id = gobject.timeout_add(self._RECONNECT_TIMEOUT, self._reconnect_cb) + self._conn = None self._conn[CONN_INTERFACE].Connect(reply_handler=connect_reply, error_handler=connect_error) @@ -242,7 +243,7 @@ class TelepathyPlugin(gobject.GObject): If the connection disappears, stop the plugin. """ - if not dbus_name: + if not dbus_name and self._conn is not None: _logger.warning( 'D-Bus name %s disappeared, this probably means %s crashed', self._conn.service_name, self._TP_CONN_MANAGER) -- cgit v0.9.1