WebSocketSubject should error instead of complete if the close code is an error code #7218
andresemartinez
started this conversation in
Ideas / Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice to have a way of specifying if a close code is an error or not. Currently the callback configured in the onclose of the websocket only checks the
wasClean
flag, but it is false only if there was no close handshake. I need to be able to close the socket from the server specifying an error code (like 3000 - Unauthroized) and have an error in the subject instead of a complete.This is the current implementation:
I think w3c does not specify an error code segment so I was thinking on being able to configre a function in the WebSocketSubjectConfig to determine if the code is an error in my particular implementation.
Beta Was this translation helpful? Give feedback.
All reactions