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

Send explicit RuntimeError on response operations after session closing #2202

Open
asvetlov opened this issue Aug 15, 2017 · 1 comment
Open
Milestone

Comments

@asvetlov
Copy link
Member

Extracted from aio-libs chat

aiohttp.client_exceptions.ClientConnectionError: Connection closed when a response is significantly large: https://pastebin.com/NmmnqhVt though I am new to async stuff so likely doing something wrong...

this is because you move response out of session context and session closes connection

Yes, I see.
First snippet uses aiohttp incorrectly, I don't think we need fix our code.
Reading response after session closing is mistake.
Well, we could raise another explicit exception like RuntimeError but I doubt if we need it.

We have to raise exception, otherwise it is very hard to find source of the problem especially for developers new to aiohttp

See also #2193

@asvetlov asvetlov added this to the 3.0 milestone Oct 19, 2017
@joaosimbiose
Copy link

Thanks so much for sharing this, helped me solving my problem

@asvetlov asvetlov modified the milestones: 3.0, 3.1 Feb 12, 2018
@asvetlov asvetlov modified the milestones: 3.1, 3.2 Mar 22, 2018
@asvetlov asvetlov modified the milestones: 3.2, 3.3 May 7, 2018
@asvetlov asvetlov modified the milestones: 3.3, 3.5 Oct 18, 2018
@asvetlov asvetlov modified the milestones: 3.5, 4.0 Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants