-
Notifications
You must be signed in to change notification settings - Fork 173
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
'Normal closure' on stop() string confuses golang.org/x/net/websocket #451
Comments
ps: have you tried to use the gorilla library, or something more recent? I think that net module is not super supported and legacy. |
In pankat I use these libraries:
Maybe I should have tried a more recent implementation. For me it works right now but on the next iteration I keep this in mind. I've added this issue in case someone gets down the same rabbit hole. |
https://github.com/gorilla development has stalled also. |
I’ve used this one last year -> github.com/gobwas/ws
I remember when the gorilla maintainer said he was stepping down, so yeah it must have stalled.
… On Apr 7, 2023, at 2:42 AM, Joachim Schiele ***@***.***> wrote:
https://github.com/gorilla development has stalled also.
—
Reply to this email directly, view it on GitHub <#451 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6UOAHUD6ECQT5RGU24TW77OPNANCNFSM6AAAAAAV3TDN5M>.
You are receiving this because you commented.
|
https://github.com/gobwas/ws maybe I'll give this a try this week. |
Problem
The default implementation of stop() sends this data, which can be seen in wireshark:
0000 03 e8 4e 6f 72 6d 61 6c 20 63 6c 6f 73 75 72 65 ..Normal closure
This confused my go application because it received a message with the contents:
/R"<\n
And it was quite hard to debug. I'm not sure if this is a bug at all. It seems that golang.org/x/net/websocket interpretes the reason as a normal message but instead of the text
I see
with \n being a newline.
Solution
m_webSocket->stop(ix::WebSocketCloseConstants::kNormalClosureCode, "");
Detailed problem & solution
default stop code confused my application
Adaption to the stop call
The text was updated successfully, but these errors were encountered: