mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
we want to retry on first EPIPE on write
This commit is contained in:
parent
7d83418b60
commit
834c080b7a
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user