From 7f36bc1bbd42d864c6d878d730357716b9a7ad73 Mon Sep 17 00:00:00 2001 From: benoitc Date: Thu, 22 Apr 2010 11:54:34 +0200 Subject: [PATCH] ignore connection reset --- gunicorn/workers/async.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gunicorn/workers/async.py b/gunicorn/workers/async.py index 7cf8cf09..1587d1a3 100644 --- a/gunicorn/workers/async.py +++ b/gunicorn/workers/async.py @@ -27,10 +27,13 @@ class AsyncWorker(Worker): while self.handle_request(client, addr): pass except socket.error, e: - if e[0] != errno.EPIPE: + if e[0] not in (errno.EPIPE, errno.ECONNRESET): self.log.exception("Error processing request.") else: - self.log.warn("Ignoring EPIPE") + if e[0] == errno.ECONNRESET: + self.log.warn("Ignoring connection reset") + else: + self.log.warn("Ignoring EPIPE") except UnexpectedEOF: self.log.exception("Client closed the connection unexpectedly.") except Exception, e: