summaryrefslogtreecommitdiff
path: root/wsgitools
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2009-10-25 20:41:14 +0100
committerHelmut Grohne <helmut@subdivi.de>2009-10-25 20:41:14 +0100
commit0965b23dd9ad8f393ddd2e3f0c42977a1289bec1 (patch)
tree1218c73f3dd6e479cb007c2a1d900d85c5517a9c /wsgitools
parent0aa63f96ea27cb276edd5bcc887dffd6c24caaf5 (diff)
downloadwsgitools-0965b23dd9ad8f393ddd2e3f0c42977a1289bec1.tar.gz
observed SocketFileWrapper bug fixed
Diffstat (limited to 'wsgitools')
-rw-r--r--wsgitools/scgi/forkpool.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index 8d56178..12a82ff 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -25,8 +25,11 @@ class SocketFileWrapper:
internal method for receiving and counting incoming data
@raise socket.error:
"""
+ toread = min(size, self.toread)
+ if not toread:
+ return ""
try:
- data = self.sock.recv(min(size, self.toread))
+ data = self.sock.recv(toread)
except socket.error, why:
if why[0] in (errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN):
data = ""