RuntimeError if websocket client disconnects from the server before websocket connection is accepted #2311
Unanswered
invisibleroads
asked this question in
Potential Issue
Replies: 1 comment
-
Please see master...invisibleroads:uvicorn:patch-3 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
During server shutdown (i.e. CTRL-C),
uvicorn
raises aRuntimeError
if a websocket client disconnected from the server before the websocket connection was accepted.The offending code is in https://github.com/encode/uvicorn/blob/master/uvicorn/protocols/websockets/websockets_impl.py
I think we can safely wrap the
transport.write
in a try catch:Beta Was this translation helpful? Give feedback.
All reactions