-
-
Notifications
You must be signed in to change notification settings - Fork 743
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 disconnect event on connection lost for wsproto
#996
Conversation
seems like the exception check was added in 3cab132#diff-5f163724db1eaba811cc5e4ed55e529af488e351ee52ccfb7c1ad0329a8f0d92R65-R66 and I dont get the rationale given the context, I know it's been a while but do you remember why @almarklein or @tomchristie ? |
Fixes #997 |
Thank you for the PR @sephioh ! Also, sorry for the long waiting time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a test for this before merging it.
aaff189
to
37cc16c
Compare
websocket.disconnect
event when client lost connection on wsproto
websocket.disconnect
event when client lost connection on wsproto
websocket.disconnect
event when client loses connection on wsproto
websocket.disconnect
event when client loses connection on wsproto
wsproto
Using uvicorn with wsproto implementation, if clients do not close websocket connections properly, no
exc
will be sent toconnection_lost
(see code below).As in the current version of uvicorn, this creates two issues:
websocket.disconnect
events;run_asgi
(asyncio) task running for each non properly closed connection;In order to reproduce the issue, follow instructions on this repo: https://github.com/sephioh/uvicorn-wsproto-issue
Edit by @Kludex :