]> code.delx.au - pymsnt/commitdiff
Handle disconnects better.
authorjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Sun, 2 Jul 2006 14:10:57 +0000 (14:10 +0000)
committerjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Sun, 2 Jul 2006 14:10:57 +0000 (14:10 +0000)
git-svn-id: http://delx.cjb.net/svn/pymsnt/trunk@184 55fbd22a-6204-0410-b2f0-b6c764c7e90a

committer: jamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>

src/tlib/msn/msnw.py

index d352cbe4491b21727dcf9a247d9bf991d9159cd4..87ed0442623ce420d1881590cf7059ed98383447 100644 (file)
@@ -231,10 +231,11 @@ class MSNConnection:
                        self.notificationClient.logOut()
                for c in self.connectors:
                        c.disconnect()
+               self.connectors = []
                if self.notificationFactory:
                        self.notificationFactory.stopTrying()
                        self.notificationFactory.msncon = None
-               self.connectors = []
+                       self.notificationFactory = None
                for sbs in self.switchboardSessions.values():
                        if hasattr(sbs, "transport") and sbs.transport:
                                sbs.transport.loseConnection()
@@ -388,7 +389,7 @@ class NotificationClient(msn.NotificationClient):
                # are now redundant
                self.loginFailure = self.doDisconnect
                self.loggedIn = self.doDisconnect
-               self.connectionLost = self.doDisconnect
+               self.connectionLost = lambda reason: msn.NotificationClient.connectionLost(self, reason)
        
        def connectionLost(self, reason):
                if not self.factory.msncon: