diff options
-rw-r--r-- | wsgitools/scgi/forkpool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py index a0b4139..8d56178 100644 --- a/wsgitools/scgi/forkpool.py +++ b/wsgitools/scgi/forkpool.py @@ -26,7 +26,7 @@ class SocketFileWrapper: @raise socket.error: """ try: - data = self.sock.recv(size) + data = self.sock.recv(min(size, self.toread)) except socket.error, why: if why[0] in (errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN): data = "" |