jsonrpc: pass timeout to aiohttp session

This commit is contained in:
ThomasV 2020-05-02 17:25:30 +02:00
parent 123b8c1792
commit 085b6ca2ab

View file

@ -107,7 +107,7 @@ def request(config: SimpleConfig, endpoint, args=(), timeout=60):
loop = asyncio.get_event_loop()
async def request_coroutine():
async with aiohttp.ClientSession(auth=auth) as session:
server = AiohttpClient(session, server_url)
server = AiohttpClient(session, server_url, timeout=timeout)
f = getattr(server, endpoint)
response = await f(*args)
return response.data.result