]> code.delx.au - pymsnt/blobdiff - src/tlib/msn/msn.py
Data received after the connection has been cleaned up is now ignored (instead of...
[pymsnt] / src / tlib / msn / msn.py
index 1ad7cfd9cd04ae06eff61f61a0be7817a3fe9792..373c5511e6021c359c675e0f992dccb1e7be3c16 100644 (file)
@@ -786,11 +786,12 @@ class MSNEventBase(LineReceiver):
         raise NotImplementedError
 
     def sendLine(self, line):
-        if LINEDEBUG: log.msg(">> " + line)
+        if LINEDEBUG: log.msg("<< " + line)
         LineReceiver.sendLine(self, line)
 
     def lineReceived(self, line):
-        if LINEDEBUG: log.msg("<< " + line)
+        if LINEDEBUG: log.msg(">> " + line)
+        if not self.connected: return
         if self.currentMessage:
             self.currentMessage.readPos += len(line+"\r\n")
             try:
@@ -827,6 +828,7 @@ class MSNEventBase(LineReceiver):
             self.handle_UNKNOWN(cmd, params.split(' '))
 
     def rawDataReceived(self, data):
+        if not self.connected: return
         extra = ""
         self.currentMessage.readPos += len(data)
         diff = self.currentMessage.readPos - self.currentMessage.length