From ce1cf65ab2ddbf0be6b2c747b72ac26197a580cd Mon Sep 17 00:00:00 2001 From: jamesbunton Date: Sun, 2 Jul 2006 14:10:57 +0000 Subject: [PATCH] Handle disconnects better. git-svn-id: http://delx.cjb.net/svn/pymsnt/trunk@184 55fbd22a-6204-0410-b2f0-b6c764c7e90a committer: jamesbunton --- src/tlib/msn/msnw.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tlib/msn/msnw.py b/src/tlib/msn/msnw.py index d352cbe..87ed044 100644 --- a/src/tlib/msn/msnw.py +++ b/src/tlib/msn/msnw.py @@ -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: -- 2.39.2