-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
Make websocket close include the status code #854
Conversation
HI davidot, could you update to the newest main branch? It's just for macOS build, which does not work anymore on macos11? |
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.
f8456e8
to
9f484b9
Compare
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 |
Restarted the ci jobs, seems GitHub had an hiccup, all run successful (except windows which takes longer....) |
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 just notized that documentation needs to be adapted.
Just changed it already.
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)