-
Notifications
You must be signed in to change notification settings - Fork 354
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
Closing WebSocket throws error if code is not in range 3000 - 4999 #1203
Comments
Allowing 1000 seems like a good idea. |
Hello @brianquinlan , thanks for reply and quick fix. However after I checked the submitted code I have to reopen the issue. Hope this helps |
But it does not allow that for user set codes. From https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code :
This behavior is standardized in the whatng Web Socket Spec |
Please see the docs here: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code |
Or, I thought it was about server-sent codes, and we're actually talking about client-sent codes. I guess it's correct then. Sorry for bothering. |
In
pkgs/web_socket/lib/src/utils.dart
you check if the close code is within the range of 3000 - 4999Is there a reason for this? basically closing the websocket with code 1000 ( normal closure) will throw an error
in
pkgs/web_socket/lib/src/io_web_socket.dart
The text was updated successfully, but these errors were encountered: