[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] On timeout, mark packets as temorarily failed



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv21719/src/minion/lib/mixminion

Modified Files:
	MMTPClient.py TLSConnection.py 
Log Message:
On timeout, mark packets as temorarily failed

Index: MMTPClient.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/MMTPClient.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- MMTPClient.py	3 Jan 2004 07:35:23 -0000	1.47
+++ MMTPClient.py	11 Jan 2004 07:38:27 -0000	1.48
@@ -322,6 +322,8 @@
             EventStats.log.failedConnect()
         self._isConnected = 0
         self._failPendingPackets()
+    def onTimeout(self):
+        self.onTLSError()
     def onClosed(self): pass
     def doneWriting(self): pass
     def receivedShutdown(self):

Index: TLSConnection.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/TLSConnection.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TLSConnection.py	4 Jan 2004 19:36:29 -0000	1.3
+++ TLSConnection.py	11 Jan 2004 07:38:27 -0000	1.4
@@ -153,6 +153,7 @@
         if self.lastActivity <= cutoff:
             LOG.warn("Connection to %s timed out: %s seconds without activity",
                      self.address, time.time()-self.lastActivity)
+            self.onTimeout()
             self.__close()
 
     def getInbuf(self, maxBytes=None, clear=0):
@@ -449,6 +450,10 @@
         """Called when we get an error on the connection."""
         raise NotImplemented()
 
+    def onTimeout(self):
+        """DOCDOC"""
+        raise NotImplemented()
+
     def onClosed(self):
         """Called when the underlying socket is closed."""
         raise NotImplemented()