*sigh* what I previously thought was a bug reducer turned out to create bugs
[theonering] / src / autogv.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