From a5379e67fa679035d34db51f65af9599c77e4339 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Mon, 18 Jan 2010 04:20:49 +0100 Subject: [PATCH] 80 column --- gunicorn/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gunicorn/util.py b/gunicorn/util.py index 0eb9580d..a0b2f99f 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -43,6 +43,9 @@ monthname = [None, def close(sock): + """ socket.close() doesn't *really* close if + there's another reference to it in the TCP/IP stack. + (trick from twisted)""" try: sock.shutdown(2) except socket.error: @@ -55,7 +58,7 @@ def close(sock): def read_partial(sock, length): while True: try: - ret = select.select([sock.fileno()], [], [], 2.0) + ret = select.select([sock.fileno()], [], []) if ret[0]: break except select.error, e: if e[0] == errno.EINTR: