From 096da6ee3947f9b2823cd4c78c4055c868c7b75f Mon Sep 17 00:00:00 2001 From: benoitc Date: Thu, 25 Feb 2010 13:22:43 +0100 Subject: [PATCH] retry on first EPIPE --- gunicorn/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/util.py b/gunicorn/util.py index fb0e284b..1e79951b 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -117,6 +117,8 @@ def write(sock, data): except socket.error, e: if e[0] in (errno.EWOULDBLOCK, errno.EAGAIN): break + if e[0] == errno.EPIPE and i == 0: + continue raise i += 1