Ending a websocket handler does not close the websocket #2721
Unanswered
wiggzz
asked this question in
Potential Issue
Replies: 1 comment 1 reply
-
|
Hmmm... I think I noticed this some time ago, and I was supposed to merge this: #2332 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am not sure if this is an issue or not but I can't find much information on the expected behavior (and this may well be the responsibility of FastAPI). But it seems that when the asgi handler for a websocket ends, the websocket is not closed gracefully. This can result in a client staying connected even though the server handler is no longer running. My expectation is that when the handler ends, the websocket client should be notified with a close message since nothing more can happen there.
Reproducer here https://github.com/wiggzz/websocket-disconnect
Beta Was this translation helpful? Give feedback.
All reactions