diff options
author | Helmut Grohne <helmut@subdivi.de> | 2010-05-25 22:50:41 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2010-05-25 22:50:41 +0200 |
commit | 6a1bdfb2a8bc5677e94cee14e12d8e53c6b3ed6d (patch) | |
tree | 03b74e23846d9b70d3a8060af7c3887cd50bf735 /wsgitools/scgi | |
parent | b284167efc3184effb5685cd71196defcf77a3fc (diff) | |
download | wsgitools-6a1bdfb2a8bc5677e94cee14e12d8e53c6b3ed6d.tar.gz |
bugfix: endless loop for closed connection in scgi.forkpool
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r-- | wsgitools/scgi/forkpool.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py index 12a82ff..252c455 100644 --- a/wsgitools/scgi/forkpool.py +++ b/wsgitools/scgi/forkpool.py @@ -44,10 +44,8 @@ class SocketFileWrapper: """ try: while self.toread > 0: - if self.toread > 4096: - self._recv(4096) - else: - self._recv(self.toread) + if not self._recv(min(self.toread, 4096)): + return except socket.error: pass |