consul
consul copied to clipboard
[consul.aio] ClientSession.close was never awaited
Overview of the Issue
During teardown, consul tries to close the active session but since ClientSession.close is in async function, it has to be awaited in order for the session to be closed.
Reproduction Steps
# script.py
from consul.aio import Consul
client = Consul()
After running this script, you'll run into the following warning:
RuntimeWarning: coroutine 'ClientSession.close' was never awaited
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fb609145b80>
Strange no one ever commented on this
Having the same... Using aiortc. No idea what
ERROR:asyncio:Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f9825da30> ERROR:asyncio:Task was destroyed but it is pending!
It looks like you are looking for assistance with a third party python library for interfacing with Consul. That is not maintained by Hashicorp. Please use our forums for this type of assistance: https://discuss.hashicorp.com/c/consul