Repository navigation
Make websocket close include the status code - #854
Merged
Merged
Conversation
Member
|
HI davidot, could you update to the newest main branch? It's just for macOS build, which does not work anymore on macos11? |
gittiver
requested changes
Jul 27, 2024
The first two bytes of a WS close packet (opcode 0x8) represent the status code, where 1000 is normal clean exit.
Otherwise this would invalidate connection leading to e.g. get_remote_ip to already being cleaned before the onclose handler was called.
davidot
force-pushed
the
add-ws-exit-status
branch
from
July 28, 2024 19:49
f8456e8 to
9f484b9
Compare
Contributor
Author
|
Rebased on master, added enum (non-class one, can change that) and fixed 0 codes. CI failure is a already present unit test, although it is not failing on master? It is passing for me locally |
Member
|
Restarted the ci jobs, seems GitHub had an hiccup, all run successful (except windows which takes longer....) |
gittiver
approved these changes
Jul 28, 2024
gittiver
requested changes
Jul 29, 2024
gittiver
approved these changes
Jul 29, 2024
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.
In the websocket protocol the first two bytes of the payload in a close packet indicate the status code.
Fixes: #545
And also the third commit fixes #549 (at the very least the simple case)