Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-04-21 14:47:19 (GMT)
committer Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-04-21 14:47:19 (GMT)
commit507e53d55d2f0767f35777e2db40abd654605f08 (patch)
tree0ac5d633d51ef5f7e2b878f482604ecc7a71fab2
parent58834c901da02177301ec63b610e5cf7afde00ec (diff)
always reset the reconnect timer when disconnected
-rw-r--r--src/telepathy_plugin.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/telepathy_plugin.py b/src/telepathy_plugin.py
index 737023b..c85bdd1 100644
--- a/src/telepathy_plugin.py
+++ b/src/telepathy_plugin.py
@@ -193,6 +193,8 @@ class TelepathyPlugin(gobject.GObject):
if self._backoff_id != 0:
gobject.source_remove(self._backoff_id)
+ _logger.debug("%r: restart reconnect time out (%u seconds)",
+ self, self._reconnect_timeout / 1000)
self._backoff_id = gobject.timeout_add(self._reconnect_timeout,
self._reconnect_cb)
@@ -291,14 +293,14 @@ class TelepathyPlugin(gobject.GObject):
_logger.debug("%r: disconnected (reason %r)", self, reason)
if reason == CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED:
# FIXME: handle connection failure; retry later?
+ _logger.debug("%r: authentification failed. Give up ", self)
pass
else:
# Try again later. We'll detect whether we have a network
# connection after the retry period elapses. The fact that
# this timer is running also serves as a marker to indicate
# that we shouldn't try to go back online yet.
- if self._backoff_id:
- self._reset_reconnect_timer()
+ self._reset_reconnect_timer()
self.emit('status', self._conn_status, int(reason))