-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session not closed in aiohttp.request after exception #3628
Comments
GitMate.io thinks the contributor most likely able to help you is @asvetlov. Possibly related issues are #2920 (AIOHttp failing after some requests), #3523 (aiohttp not forwarding cookies with Session requests), #3031 (aiohttp request exceptions can't be caught sometimes when encountering bad http message), #3296 (aiohttp client session. it doesn't close a connection after keepalive_timeout), and #1403 ([QUESTION] aiohttp.ClientSession.request('GET') issue). |
(cherry picked from commit 20bfadc) Co-authored-by: Robert Nikolich <[email protected]>
Fixed by #3640 |
(cherry picked from commit 20bfadc) Co-authored-by: Robert Nikolich <[email protected]>
Long story short
subj
First I get ClientConnectorError (connection-related errors are expected in my application), after that i see
Unclosed client session
warning.Expected behaviour
ClientSession, created inside aiohttp.request, is closed after programm leaves
async with
block.Actual behaviour
ClientSession is not closed.
Steps to reproduce
Your environment
aiohttp 3.5.4
python 3.5
debian stretch
Why use aiohttp.request at all, opening new connection for every request is bad
I need to open new connection anyway:
The text was updated successfully, but these errors were encountered: