Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Collett <morgan.collett@gmail.com>2007-11-01 12:03:19 (GMT)
committer Morgan Collett <morgan.collett@gmail.com>2007-11-01 12:30:42 (GMT)
commitafe189973761162a187daaee9932279b2c0c00b5 (patch)
tree11507aade00fb83a2a93c1b9ecba90ff524d6268
parent8194676f5753183e64b53eae7c9fb21a5b6b9fc7 (diff)
#2412: Improvements to connection watching after smcv review
-rw-r--r--src/telepathy_plugin.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/telepathy_plugin.py b/src/telepathy_plugin.py
index 26ca8fb..9ec0321 100644
--- a/src/telepathy_plugin.py
+++ b/src/telepathy_plugin.py
@@ -243,11 +243,11 @@ class TelepathyPlugin(gobject.GObject):
If the connection disappears, stop the plugin.
"""
if not dbus_name:
- if self._conn_status == CONNECTION_STATUS_CONNECTED:
- _logger.debug('telepathy connection %s lost: stopping %s',
- self._conn.service_name, self._TP_CONN_MANAGER)
- self._conn = None
- self._stop()
+ _logger.warning('telepathy connection %s lost: stopping %s',
+ self._conn.service_name, self._TP_CONN_MANAGER)
+ self._handle_connection_status_change(
+ CONNECTION_STATUS_DISCONNECTED,
+ CONNECTION_STATUS_REASON_NONE_SPECIFIED)
def _handle_connection_status_change(self, status, reason):
if status == self._conn_status:
@@ -291,6 +291,9 @@ class TelepathyPlugin(gobject.GObject):
self._matches = []
for match in matches:
match.remove()
+ if self._watch_conn_name is not None:
+ self._watch_conn_name.cancel()
+ self._watch_conn_name = None
if self._conn:
try: