Skip to content
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

Returning reason on socket close #1062

Open
roycw opened this issue Nov 25, 2024 · 0 comments
Open

Returning reason on socket close #1062

roycw opened this issue Nov 25, 2024 · 0 comments
Labels
question Discussion about functionality

Comments

@roycw
Copy link

roycw commented Nov 25, 2024

Guys we have this code in the socket

socket.onclose = (e) => {
debug('msl:websocket:close')(${e.code})
if (e.code === CLOSE_GOING_AWAY) {
this.onServerClose && this.onServerClose()
}
// Terminate the streams.
incoming.push(null)
outgoing.end()
}

is there anyway we can pass the entire e object back to the onServerClose so we can send custom reasons?

@roycw roycw added the question Discussion about functionality label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Discussion about functionality
Projects
None yet
Development

No branches or pull requests

1 participant