[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] When accepting an incoming connection, don"t die just b...
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria:/tmp/cvs-serv4948/lib/mixminion/server
Modified Files:
MMTPServer.py
Log Message:
When accepting an incoming connection, don't die just because the connection closes before we can get its address. This only happens under heavy load. Fixes bug 485, 213, and maybe others.
Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- MMTPServer.py 10 Nov 2005 02:17:08 -0000 1.91
+++ MMTPServer.py 12 Sep 2007 19:49:41 -0000 1.92
@@ -320,9 +320,12 @@
def process(self, r, w, x, cap):
#XXXX007 do something with x
- con, addr = self.sock.accept()
- LOG.debug("Accepted connection from %s", addr)
- self.connectionFactory(con)
+ try:
+ con, addr = self.sock.accept()
+ LOG.debug("Accepted connection from %s", addr)
+ self.connectionFactory(con)
+ except socket.error, e:
+ LOG.warn("Socket error while accepting connection: %s", e)
return self.isOpen,0,self.isOpen,0
def getStatus(self):