jsonrpc: pass timeout to aiohttp session
This commit is contained in:
@@ -107,7 +107,7 @@ def request(config: SimpleConfig, endpoint, args=(), timeout=60):
|
|||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
async def request_coroutine():
|
async def request_coroutine():
|
||||||
async with aiohttp.ClientSession(auth=auth) as session:
|
async with aiohttp.ClientSession(auth=auth) as session:
|
||||||
server = AiohttpClient(session, server_url)
|
server = AiohttpClient(session, server_url, timeout=timeout)
|
||||||
f = getattr(server, endpoint)
|
f = getattr(server, endpoint)
|
||||||
response = await f(*args)
|
response = await f(*args)
|
||||||
return response.data.result
|
return response.data.result
|
||||||
|
|||||||
Reference in New Issue
Block a user