diff options
author | Allan Saddi <allan@saddi.com> | 2007-05-11 16:52:04 +0000 |
---|---|---|
committer | Allan Saddi <allan@saddi.com> | 2007-05-11 16:52:04 +0000 |
commit | b16eb34a602b758f46194cc91db1dd15b06d239f (patch) | |
tree | 8228400d25339503af4dc7662719d8af82e7252c /flup | |
parent | 2cab464ff40b42cf6798b2f8f4a7bf65e808aa66 (diff) | |
download | flup-b16eb34a602b758f46194cc91db1dd15b06d239f.tar.gz |
Catch and ignore EPIPE when flushing the streams and ending the request.
Diffstat (limited to 'flup')
-rw-r--r-- | flup/server/fcgi_base.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/flup/server/fcgi_base.py b/flup/server/fcgi_base.py index 15f59c9..42ab282 100644 --- a/flup/server/fcgi_base.py +++ b/flup/server/fcgi_base.py @@ -567,8 +567,12 @@ class Request(object): if __debug__: _debug(1, 'protocolStatus = %d, appStatus = %d' % (protocolStatus, appStatus)) - self._flush() - self._end(appStatus, protocolStatus) + try: + self._flush() + self._end(appStatus, protocolStatus) + except socket.error, e: + if e[0] != errno.EPIPE: + raise def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE): self._conn.end_request(self, appStatus, protocolStatus) |