Delaying when we advertize the connection as disconnected
authorEd Page <eopage@byu.net>
Fri, 29 Jan 2010 03:00:40 +0000 (21:00 -0600)
committerEd Page <eopage@byu.net>
Fri, 29 Jan 2010 03:00:40 +0000 (21:00 -0600)
src/connection.py

index 426515b..10d5c24 100644 (file)
@@ -223,14 +223,14 @@ class TheOneRingConnection(
                """
                For org.freedesktop.telepathy.Connection
                """
-               self.StatusChanged(
-                       telepathy.CONNECTION_STATUS_DISCONNECTED,
-                       telepathy.CONNECTION_STATUS_REASON_REQUESTED
-               )
                try:
                        self._disconnect()
                except Exception:
                        _moduleLogger.exception("Error durring disconnect")
+               self.StatusChanged(
+                       telepathy.CONNECTION_STATUS_DISCONNECTED,
+                       telepathy.CONNECTION_STATUS_REASON_REQUESTED
+               )
 
        @gtk_toolbox.log_exception(_moduleLogger)
        def RequestChannel(self, type, handleType, handleId, suppressHandler):