]> code.delx.au - pymsnt/blobdiff - src/tlib/msn/msnw.py
Data received after the connection has been cleaned up is now ignored (instead of...
[pymsnt] / src / tlib / msn / msnw.py
index b0edb3066831e03cb6e99b5afc363fb5b49b7e64..2241c22aab20b3c885233d305f26a95e7d0e04e0 100644 (file)
@@ -52,7 +52,7 @@ class MSNConnection:
                def timeout():
                        self.timeout = None
                        if not d.called:
-                               d.errback("Timeout")
+                               d.errback(Exception("Timeout"))
                                self.logOut() # Clean up everything
                self.timeout = reactor.callLater(30, timeout)
                dispatchFactory = msn.DispatchFactory()
@@ -375,7 +375,6 @@ class NotificationClient(msn.NotificationClient):
                msn.NotificationClient.logOut(self)
        
        def connectionLost(self, reason):
-               print "NotificationClient.connectionLost!!!"
                if not self.factory.msncon: return # If we called logOut
                def wait():
                        LogEvent(INFO, self.factory.msncon.ident)
@@ -465,6 +464,11 @@ class SwitchboardSessionBase(msn.SwitchboardClient):
                LogEvent(INFO, self.ident)
                del self.msncon
                self.transport.disconnect()
+       
+       def connectionLost(self, reason):
+               self.msncon = None
+               self.msnobj = None
+               self.ident = (self.ident[0], self.ident[1] + " Disconnected!")
 
        def loggedIn(self):
                LogEvent(INFO, self.ident)