From 198fe298b7f34a0250840db5a14c3f695d169752 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 26 Nov 2016 07:14:38 +0900 Subject: [PATCH] Bump timeout to 15s. Show timeout if timed out. --- electrumx_rpc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrumx_rpc.py b/electrumx_rpc.py index fb6e854..052ba7c 100755 --- a/electrumx_rpc.py +++ b/electrumx_rpc.py @@ -30,7 +30,7 @@ class RPCClient(JSONRPC): message = await f except asyncio.TimeoutError: future.cancel() - print('request timed out') + print('request timed out after {}s'.format(timeout)) else: await self.handle_message(message) @@ -82,7 +82,7 @@ def main(): coro = loop.create_connection(RPCClient, 'localhost', args.port) try: transport, protocol = loop.run_until_complete(coro) - coro = protocol.send_and_wait(args.command[0], args.param, timeout=5) + coro = protocol.send_and_wait(args.command[0], args.param, timeout=15) loop.run_until_complete(coro) except OSError: print('error connecting - is ElectrumX catching up or not running?')