*sigh* what I previously thought was a bug reducer turned out to create bugs
authorEd Page <eopage@byu.net>
Tue, 9 Feb 2010 04:01:15 +0000 (22:01 -0600)
committerEd Page <eopage@byu.net>
Tue, 9 Feb 2010 04:01:15 +0000 (22:01 -0600)
src/autogv.py
src/connection.py

index a833c61..7999ed4 100644 (file)
@@ -173,14 +173,14 @@ class AutoDisconnect(object):
                if not self.session.is_logged_in():
                        _moduleLogger.info("Received connection change event when not logged in")
                        return
-               try:
-                       self._connRef().disconnect()
-               except Exception:
-                       _moduleLogger.exception("Error durring disconnect")
                self._connRef().StatusChanged(
                        telepathy.CONNECTION_STATUS_DISCONNECTED,
                        telepathy.CONNECTION_STATUS_REASON_NETWORK_ERROR
                )
+               try:
+                       self._connRef().disconnect()
+               except Exception:
+                       _moduleLogger.exception("Error durring disconnect")
                self.__delayedDisconnectEventId = None
                return False
 
index 41ea912..cbdb388 100644 (file)
@@ -231,14 +231,14 @@ class TheOneRingConnection(
                """
                For org.freedesktop.telepathy.Connection
                """
-               try:
-                       self.disconnect()
-               except Exception:
-                       _moduleLogger.exception("Error durring disconnect")
                self.StatusChanged(
                        telepathy.CONNECTION_STATUS_DISCONNECTED,
                        telepathy.CONNECTION_STATUS_REASON_REQUESTED
                )
+               try:
+                       self.disconnect()
+               except Exception:
+                       _moduleLogger.exception("Error durring disconnect")
 
        @gtk_toolbox.log_exception(_moduleLogger)
        def RequestChannel(self, type, handleType, handleId, suppressHandler):