mosquito / aiohttp-xmlrpc

XMLRPC for aiohttp
MIT License
34 stars 19 forks source link

Problems closing aiohttp-xmlrpc aiohttps clients cleanly #27

Closed cooperlees closed 4 years ago

cooperlees commented 4 years ago

I'm having difficulty closing the connections cleanly. I'm getting the following errors after calling methods. Mainly the specific client session. I think we need to do that around the post.

2020-01-12 20:09:24,125 INFO: Syncing all packages.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x110d400d0>

Fixes Needed

1) It seems later versions of aiohttp the close method has moved to a coroutine. We should fix that.

2) Would you be open to moving to using the context managers around aiohttp calls as this will probably clean up everything cleanly and remove the error.

cooperlees commented 4 years ago

Seems more to be a case of https://github.com/aio-libs/aiohttp/issues/111 here for bandersnatch.

Passing the ClientSession I use elsewhere made this easier.