You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a connect with a remote client (well, 127.0.0.1) to my websocket server and then I kill the remote client, the loss of connection isn't detected, my WebSocket client objet is still valid (e.g. getClient() not null) and in the OPEN state (isOpen() is true).
If I then do for example : ws.getClient().getRemoteSocketAddress() I get a NullPointerException.
With Wireshark, we can see that a TCP RST was sent to the server, which should have been handled.
I'd have expected the WebSocketServer to detect the TCP abort, an onError() or onClose() event to occur and isOpen() to report false.
Version used: 1.4.0
Java version: jdk-11.0.2
Operating System and version: Windows 10
The text was updated successfully, but these errors were encountered:
I understand that the problem lays below in the socket implementation.
As we needed a faster reaction time when the connection fails and we wanted to avoid too much ping/pong traffic in the network by increasing the heartbeat pace, we based our connection sanity check on calls to getRemoteSocketAddress(). If that one returns null ("unconnected") on a previously working connection, we assume the connection is dead. It seems to work...
If a connect with a remote client (well, 127.0.0.1) to my websocket server and then I kill the remote client, the loss of connection isn't detected, my WebSocket client objet is still valid (e.g. getClient() not null) and in the OPEN state (isOpen() is true).
If I then do for example : ws.getClient().getRemoteSocketAddress() I get a NullPointerException.
With Wireshark, we can see that a TCP RST was sent to the server, which should have been handled.
I'd have expected the WebSocketServer to detect the TCP abort, an onError() or onClose() event to occur and isOpen() to report false.
The text was updated successfully, but these errors were encountered: