-
Notifications
You must be signed in to change notification settings - Fork 564
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 not closed correctly on java.net.SocketException: Connection reset #7703
Comments
@Neoministein Based on you detailed description, seems like something that should be fixed in Tyrus. If the exception is not caught while attempting to send that closing frame, there's not much Helidon can do. Do you agree with this analysis @jansupol? |
Makes sense. I am not entirely familiar with Helidon's integration with Tyrus that's why I thought it might be possible to fix it on Helidon's side. I'll open an issue on the Tyrus GitHub. When fixing it in Tyrus. Would the change need to be back merged to the Tyrus branch 2.0.X or is there a short-term plan already to update Helidon to the Jakarta WebSocket API to version 2.1? |
Helidon 2.x is javax based and Helidon 3.x is jakarta based. It depends on how it is fixed in Tyrus. @jansupol is the Tyrus lead and he'll take a look at this shortly. |
So basically the issue is that |
Will close this issue and create a new one to integrate the latest Tyrus when available. |
Environment Details
Problem Description
I am not quite sure if this belongs here or on in the tyrus GitHub.
Setup:
I've got a websocket endpoint that I've registered with the
@ServerEndpoint
annoation. I've also got a method annotated with@OnClose
.When the websocket client crashes very hard it produces:
The exception is caught and handled by
io.helidon.microprofile.tyrus.TyrusConnection.TyrusListener.onError()
. The onError method then callsthis.connection.close(...)
which then further down callsorg.glassfish.tyrus.core.ProtocolHandler.close
:The
close
method then tries so send a closing frame back to the client but since a connection does no longer exists this exception is thrown and the@OnClose
annotated method is never called:Steps to reproduce
I haven't found out a way how to produce the connection reset error in Helidon in a standalone fashion reliably. Having a websocket client and terminating the process or the operating system does not reliably produce the connection reset error.
How I came across the issue was when using a websocket written in rust which was attached to a modified videogame client (the client). When closing the game with a still open connection a connection reset error always is thrown.
Java code:
The text was updated successfully, but these errors were encountered: