Commit 03f7aecc authored by Josh Kunz's avatar Josh Kunz

Interpret 0 length timeouts the same as None valued timeouts

Previously, if the timeout has not explicitly negative or None, the
receiver would still try at least twice to get the data. With a timeout
of 0, it will work basically the same as a nowait.
parent da35596d
......@@ -288,7 +288,7 @@ class Future(object):
@classmethod
def _recv_next_timeout(kls, protocol, timeout):
if timeout is not None and timeout < 0.0:
if timeout is not None and timeout <= 0.0:
raise TimeoutException()
start = time.time()
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment