mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fixes Issue #22 - Make EPIPE stacks disappear.
Still prints a line like:
2010-02-27 00:25:21,305 - WARNING Ignoring EPIPE
This commit is contained in:
parent
d91939f110
commit
fd059eaf8f
@ -112,7 +112,7 @@ class Worker(object):
|
|||||||
self.handle(client, addr)
|
self.handle(client, addr)
|
||||||
self.nr += 1
|
self.nr += 1
|
||||||
except socket.error, e:
|
except socket.error, e:
|
||||||
if e[0] not in (errno.EAGAIN, errno.ECONNABORTED, errno.EPIPE):
|
if e[0] not in (errno.EAGAIN, errno.ECONNABORTED):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# Keep processing clients until no one is waiting.
|
# Keep processing clients until no one is waiting.
|
||||||
@ -156,6 +156,11 @@ class Worker(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
http.Response(client, response, req).send()
|
http.Response(client, response, req).send()
|
||||||
|
except socket.error, e:
|
||||||
|
if e[0] != errno.EPIPE:
|
||||||
|
self.log.exception("Error processing request. [%s]" % str(e))
|
||||||
|
else:
|
||||||
|
self.log.warn("Ignoring EPIPE")
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.log.exception("Error processing request. [%s]" % str(e))
|
self.log.exception("Error processing request. [%s]" % str(e))
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user