-
-
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
Always close implicit connector, even for keepalive responses. #79
Conversation
I think 'force_close' should be TCPConnector parameter. should we also introduce keep-alive timer for each opened connection, similar to what server handler does? |
About keep-alive timer -- nice to have, but timer can be implemented in another issue. |
Agree on both |
New patch is ready. |
Lgtm |
Always close implicit connector, even for keepalive responses.
Thanks |
I think the fix worth to be published in 0.8.2 ASAP. |
ok, i'll make release later today. |
Thank you again. |
If network resource returns keepalive response an implicit connection is not closed now.
That's leads to resource leaks and eventually to
OSError: [Errno 24] Too many open files
.I guess to always close implicit connection and process keepalives only if explicit connector has been passed to
aiohttp.request
.See http://stackoverflow.com/questions/24298095/connections-arent-closing-with-python3-asyncio-concurrent-http-get-requests/24312441?noredirect=1 as initial report for the issue