1
0

myAiohttpClient: add id counter, and rename to JsonRPCClient

This commit is contained in:
SomberNight
2020-06-09 17:50:06 +02:00
parent 50f705ee46
commit a32cb7784f
3 changed files with 9 additions and 6 deletions

View File

@@ -104,7 +104,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:
c = util.myAiohttpClient(session, server_url)
c = util.JsonRPCClient(session, server_url)
return await c.request(endpoint, *args)
try:
fut = asyncio.run_coroutine_threadsafe(request_coroutine(), loop)