[Zodb-checkins] CVS: ZODB3/ZEO - start.py:1.45.6.1.2.1
Jeremy Hylton
jeremy@zope.com
Fri, 1 Nov 2002 18:57:03 -0500
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv2691
Modified Files:
Tag: ZODB3-deadlock-debug-branch
start.py
Log Message:
Guard against asyncore exiting because of a timeout delivered at the
wrong time.
=== ZODB3/ZEO/start.py 1.45.6.1 => 1.45.6.1.2.1 ===
--- ZODB3/ZEO/start.py:1.45.6.1 Wed Oct 16 17:47:07 2002
+++ ZODB3/ZEO/start.py Fri Nov 1 18:57:02 2002
@@ -17,6 +17,8 @@
import sys, os, getopt
import types
+import errno
+import socket
def directory(p, n=1):
d = p
@@ -288,7 +290,12 @@
try:
try:
- asyncore.loop()
+ while 1:
+ try:
+ asyncore.loop()
+ except (socket.error, OSError), err:
+ if err[0] != errno.EBADF:
+ raise
finally:
if os.path.isfile(env.zeo_pid):
os.unlink(env.zeo_pid)