-
-
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
Handling WebSocket disconnects #255
Comments
Got it, my wrong. Thanks for report, I'll publish 0.14.2 patch very shortly. |
@asvetlov wait with release |
should be fixed |
Thanks, I'll give it a shot. I see you added |
|
Thanks for clarifying! |
When reading from a ws connection, the
receive_msg
function may raiseWSClientDisconnectedError
. The example in the documentation just returns the ws object once done:However, when an error is produced the exception is also stored in the closing_fut: https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/web.py#L833-L859 As a result, a warning is logged because nobody retrieves that exception. I guess one way to "solve" it is to do something like this:
But it kinda feels wrong.
Am I missing something or should this be handled differently? Thanks a lot for aiohttp, I'm really liking it so far!
The text was updated successfully, but these errors were encountered: