Commit 9632b2e7 authored by Chris McDonough's avatar Chris McDonough

Fixed bug reported on maillist during EWOULDBLOCK when using FTP server (http://

lists.zope.org/pipermail/zope/2002-March/111521.html).
parent 6f71311c
......@@ -618,7 +618,12 @@ class FTPServer(ftp_server):
requestCloseOnExec(self.socket)
def handle_accept (self):
conn, addr = self.accept()
try:
conn, addr = self.accept()
except TypeError:
# unpack non-sequence as result of accept
# returning None (in case of EWOULDBLOCK)
return
self.total_sessions.increment()
self.log_info('Incoming connection from %s:%d' % (addr[0], addr[1]))
self.ftp_channel_class (self, conn, addr, self.module)
......
......@@ -618,7 +618,12 @@ class FTPServer(ftp_server):
requestCloseOnExec(self.socket)
def handle_accept (self):
conn, addr = self.accept()
try:
conn, addr = self.accept()
except TypeError:
# unpack non-sequence as result of accept
# returning None (in case of EWOULDBLOCK)
return
self.total_sessions.increment()
self.log_info('Incoming connection from %s:%d' % (addr[0], addr[1]))
self.ftp_channel_class (self, conn, addr, self.module)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment