]> code.delx.au - pymsnt/blobdiff - src/tlib/msn/msnw.py
Changed total users to total connections in stats.
[pymsnt] / src / tlib / msn / msnw.py
index 368bdfeed3c37a08740aa702682df8be40121718..46d8018d3c059e5eb4a2f37a04f5df12554ae931 100644 (file)
@@ -51,6 +51,7 @@ class MSNConnection:
        def _getNotificationReferral(self):
                def timeout():
                        self.timeout = None
+                       dispatchFactory.d = None
                        if not d.called:
                                d.errback(Exception("Timeout"))
                                self.logOut() # Clean up everything
@@ -358,8 +359,11 @@ class SavedEvents:
 
 class DispatchClient(msn.DispatchClient):
        def gotNotificationReferral(self, host, port):
-               if self.factory.d.called: return # Too slow! We've already timed out
-               self.factory.d.callback((host, port))
+               d = self.factory.d
+               self.factory.d = None
+               if not d or d.called:
+                       return # Too slow! We've already timed out
+               d.callback((host, port))
 
 
 class NotificationClient(msn.NotificationClient):