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

WebSocket close status and reason not handled #663

Open
stbjin opened this issue Nov 6, 2024 · 0 comments
Open

WebSocket close status and reason not handled #663

stbjin opened this issue Nov 6, 2024 · 0 comments

Comments

@stbjin
Copy link

stbjin commented Nov 6, 2024

When the ws socket gets closed by peer, a closeResponse object is created but never used.
As the peer also is able to specify a close status + reason if would be nice to fetch these as well.

Today an exception is thrown with the message "Connection closed by the server", making it hard to take action as the reason for closure isn't known. My proposal is to throw a custom exception, including the close status, reason and the closeResponse message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant