[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Avoid crash when timing out connections
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv25305/lib/mixminion
Modified Files:
TLSConnection.py
Log Message:
Avoid crash when timing out connections
Index: TLSConnection.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/TLSConnection.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- TLSConnection.py 3 Jan 2004 07:35:23 -0000 1.2
+++ TLSConnection.py 4 Jan 2004 19:36:29 -0000 1.3
@@ -239,7 +239,7 @@
self.sock.close()
self.sock = None
self.tls = None
- self.__stateFn = None
+ self.__stateFn = self.__closedFn
self.onClosed()
def __connectFn(self, r, w):
@@ -293,6 +293,11 @@
self.__awaitingShutdown = 1
self.__bytesReadOnShutdown = 0
+ def __closedFn(self,r,w):
+ """state function: called when the connection is closed"""
+ self.__sock = None
+ return 0
+
def __readTooMuch(self):
"""Helper function -- called if we read too much data while we're
shutting down."""