Moved when we advertise the connection as disconnected to start the shutdown-on-idle...
authorEd Page <eopage@byu.net>
Sat, 13 Mar 2010 16:39:27 +0000 (10:39 -0600)
committerEd Page <eopage@byu.net>
Sat, 13 Mar 2010 16:39:27 +0000 (10:39 -0600)
src/connection.py
src/connection_manager.py

index 933c372..31ecd53 100644 (file)
@@ -302,4 +302,9 @@ class TheOneRingConnection(
                self.session.logout()
                self.session.close()
 
+               # In case one of the above items takes too long (which it should never
+               # do), we leave the starting of the shutdown-on-idle counter to the
+               # very end
+               self.manager.disconnect_completed(self)
+
                _moduleLogger.info("Disconnected")
index be1702a..b9a8e37 100644 (file)
@@ -61,11 +61,7 @@ class TheOneRingConnectionManager(tp.ConnectionManager):
 
                return result
 
-       def disconnected(self, conn):
-               """
-               Overrides tp.ConnectionManager
-               """
-               result = tp.ConnectionManager.disconnected(self, conn)
+       def disconnect_completed(self):
                gobject_utils.timeout_add_seconds(self.IDLE_TIMEOUT, self._shutdown)
 
        def quit(self):