Skip to content
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

Force-closing of proxy connections is broken #4953

Open
bitphage opened this issue Sep 8, 2020 · 0 comments
Open

Force-closing of proxy connections is broken #4953

bitphage opened this issue Sep 8, 2020 · 0 comments
Labels

Comments

@bitphage
Copy link
Contributor

bitphage commented Sep 8, 2020

🐞 Describe the bug

#3070 introduced force-closing of proxy connections, though the way it has been implemented (proto.force_close() call) doesn't work. So instead of making such hard-coded things I suggest removing this code and instead adding into documentation something like this: "If you're experiencing timeouts or other issues with proxy connections, use force_close=True to force close proxy connections after each request/response".

💡 To Reproduce

  1. Spin up proxy
  2. Set up Connector with high keepalive_temeout
  3. Run session.get() call in while-loop with asyncio.sleep()
  4. watch -n 0.5 'netstat -napt |grep 8888' where 8888 is your proxy port
  5. See proxy connections not being closed

💡 Expected behavior

  1. No confusing broken code in the library
  2. Let the user decide to close or not proxy connections (just use force_close)

📋 Your version of the aiohttp/yarl/multidict distributions

$ python -m pip show aiohttp
Name: aiohttp
Version: 3.6.1
...

📋 Additional context

client

@bitphage bitphage added the bug label Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant