-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
ServerDisconnectedError is trigger happy #394
Comments
I figured out what the issue was, if the session connection is closed before you try to read the results of the requests ServerDisconnectedError fires. This must've been a functional change is an update, I did not receive this error using and older version of aiohttp Is it necessary to close the connection on all requests? |
Response should be release explicitly ( |
Thanks! Was wondering what the best practice was for opening and closing connections. Calling response and connector |
I think it's a bug. @fafhrd91 that do you think about? |
Running I probably should have noted that this was being used for |
Please elaborate. |
I upgraded to the latest aiohttp and this is no longer an issue. |
Good |
@asvetlov how do you imagine a combination of |
|
@asvetlov are you even serious? What if response must outlive the function in which it is created? |
I'm deadly serious.
|
If I could chose everything about my code, I wouldn't chose Python, and surely not asyncio, and none of its minions. The reason I'm here is that I cannot chose. One thing I cannot chose is what to do with response generated in this way. It must outlive the scope of the context manager it is in. Sorry for the tone: most things I'm upset about aren't your fault. The retard who conceived the idea of context managers is probably the most guilty one, but Python core developers must share in this responsibility, obviously. You are only guilty of thinking that it is a good idea to use one. Now, technically, you probably realize there is a problem. You probably also suspect that there isn't a good solution, (because, what you offer is certainly not a solution) that that was a mistake, but the change to API is too extreme. You'd rather live with bad API than try to deal with change. I can understand this too. |
In addition to above, if response outlives the session, then |
Please keep your emotions for other places. The thread is frozen, it falled into counterproductive series of blames. |
I'm getting this error a lot when using the aiohttp library when making http requests. It's firing on over 50% of the domains I visit. The documentation is extremely light on what this error actually is why it is firing at all. Can someone clarify what it is?
The text was updated successfully, but these errors were encountered: