-
-
Notifications
You must be signed in to change notification settings - Fork 948
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
Add reason to WebSocket closure #1417
Add reason to WebSocket closure #1417
Conversation
Change GitHub issue templates
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 understand the default value change on code
, but that is another issue, and it's also considered a breaking change.
Co-authored-by: Marcelo Trylesinski <[email protected]>
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.
Added a comment, but your call.
Everything is cool 👍 Thanks! 🎉
Co-authored-by: Marcelo Trylesinski <[email protected]>
Closes #991.
According to the ASGI spec here
reason
can be included inwebsocket.close
which is an optional string.I think what @Kludex mentioned here makes sense:- We can includecode
inwebsocket.close
only when it's specified in Starlette, and don't include it when not set, as per the ASGI spec it is optional int and already handled by Uvicorn here and Daphne here and Hypercorn here.reason
inwebsocket.close
only when it's specified as per the ASGI spec it's optional and will be handled by ASGI servers.Any feedback would be appreciated.