we want to retry on first EPIPE on write

This commit is contained in:
Benoit Chesneau 2010-01-21 15:18:18 +01:00
parent 7d83418b60
commit 834c080b7a
2 changed files with 2 additions and 7 deletions

View File

@ -62,7 +62,6 @@ def write(sock, data):
if e[0] in (errno.EWOULDBLOCK, errno.EAGAIN):
break
elif e[0] in (errno.EPIPE,):
break
if i == 0:
continue
raise

View File

@ -37,11 +37,9 @@ class Worker(object):
self.socket = socket
util.close_on_exec(self.socket)
self.socket.setblocking(0)
util.close_on_exec(fd)
self.address = self.socket.getsockname()
self.app = app
@ -101,7 +99,7 @@ class Worker(object):
allocate more fs or ENOMEM when there is not enough
memory to allocate. BSD return ENOBUFS.
"""
log.info("Could not accept new connection (%s)" % str(e))
log.warning("Could not accept new connection (%s)" % str(e))
raise
if nr == 0: break
@ -116,8 +114,6 @@ class Worker(object):
except select.error, e:
if e[0] == errno.EINTR:
break
elif e[0] == errno.EBADF:
return
raise
spinner = (spinner+1) % 2