[Zope-Checkins] CVS: Zope/ZServer - FTPServer.py:1.21.2.1

Chris McDonough chrism@zope.com
Fri, 25 Jan 2002 01:11:01 -0500


Update of /cvs-repository/Zope/ZServer
In directory cvs.zope.org:/tmp/cvs-serv17652

Modified Files:
      Tag: chrism_logrotate_branch
	FTPServer.py 
Log Message:
Caught a condition in handle_accept whereby when an EWOULDBLOCK is through, accpt() returns None.


=== Zope/ZServer/FTPServer.py 1.21 => 1.21.2.1 ===
 
     def handle_accept (self):
-        conn, addr = self.accept()
+        tup = self.accept()
+        if tup is None:
+            # when EWOULDBLOCK is thrown, accept returns None
+            return
+        conn, addr = tup
         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)