summaryrefslogtreecommitdiff
path: root/wsgitools/scgi
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2010-05-25 22:50:41 +0200
committerHelmut Grohne <helmut@subdivi.de>2010-05-25 22:50:41 +0200
commit6a1bdfb2a8bc5677e94cee14e12d8e53c6b3ed6d (patch)
tree03b74e23846d9b70d3a8060af7c3887cd50bf735 /wsgitools/scgi
parentb284167efc3184effb5685cd71196defcf77a3fc (diff)
downloadwsgitools-6a1bdfb2a8bc5677e94cee14e12d8e53c6b3ed6d.tar.gz
bugfix: endless loop for closed connection in scgi.forkpool
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r--wsgitools/scgi/forkpool.py6
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