diff options
author | Helmut Grohne <helmut@subdivi.de> | 2009-10-25 20:41:14 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2009-10-25 20:41:14 +0100 |
commit | 0965b23dd9ad8f393ddd2e3f0c42977a1289bec1 (patch) | |
tree | 1218c73f3dd6e479cb007c2a1d900d85c5517a9c /wsgitools/scgi | |
parent | 0aa63f96ea27cb276edd5bcc887dffd6c24caaf5 (diff) | |
download | wsgitools-0965b23dd9ad8f393ddd2e3f0c42977a1289bec1.tar.gz |
observed SocketFileWrapper bug fixed
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r-- | wsgitools/scgi/forkpool.py | 5 |
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 = "" |