Commit b0f317b7 authored by Jim Fulton's avatar Jim Fulton

fixed weird timeout default and added some missing plumbing

Timeout default was False, which must have resulted from an editing
error, but we failed to pass it through where it was needed
anyway. Fixed now.
parent 357379f1
......@@ -705,7 +705,7 @@ class ClientRunner:
from concurrent.futures import Future
call_soon_threadsafe = loop.call_soon_threadsafe
def call(meth, *args, timeout=False):
def call(meth, *args, timeout=None):
result = Future()
call_soon_threadsafe(meth, result, *args)
return self.wait_for_result(result, timeout)
......@@ -714,7 +714,7 @@ class ClientRunner:
def wait_for_result(self, future, timeout):
try:
return future.result(self.timeout if timeout is False else timeout)
return future.result(self.timeout if timeout is None else timeout)
except concurrent.futures.TimeoutError:
if not self.client.ready:
raise ClientDisconnected("timed out waiting for connection")
......@@ -722,7 +722,7 @@ class ClientRunner:
raise
def call(self, method, *args, timeout=None):
return self.__call(self.call_threadsafe, method, args)
return self.__call(self.call_threadsafe, method, args, timeout=timeout)
def call_future(self, method, *args):
# for tests
......
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