Add reason to WebSocket closure#1417
Merged
aminalaee merged 20 commits intoKludex:masterfrom Jan 22, 2022
aminalaee:add-websocket-close-reason
Merged
Add reason to WebSocket closure#1417aminalaee merged 20 commits intoKludex:masterfrom aminalaee:add-websocket-close-reason
aminalaee merged 20 commits intoKludex:masterfrom
aminalaee:add-websocket-close-reason
Conversation
Change GitHub issue templates
aminalaee
commented
Jan 15, 2022
Kludex
reviewed
Jan 15, 2022
Owner
Kludex
left a comment
There was a problem hiding this comment.
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 <marcelotryle@gmail.com>
Kludex
reviewed
Jan 18, 2022
Kludex
reviewed
Jan 21, 2022
Kludex
approved these changes
Jan 22, 2022
Owner
Kludex
left a comment
There was a problem hiding this comment.
Added a comment, but your call.
Everything is cool 👍 Thanks! 🎉
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #991.
According to the ASGI spec here
reasoncan be included inwebsocket.closewhich is an optional string.I think what @Kludex mentioned here makes sense:- We can includecodeinwebsocket.closeonly 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.reasoninwebsocket.closeonly when it's specified as per the ASGI spec it's optional and will be handled by ASGI servers.Any feedback would be appreciated.