Skip to content

Commit

Permalink
[java] must not request further invocations for a broken websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
joerg1985 committed Dec 5, 2023
1 parent 3f9f83d commit cdbe9c6
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ public void onError(java.net.http.WebSocket webSocket, Throwable error) {
LOG.log(
Level.FINE, error, () -> "An error has occurred: " + error.getMessage());
listener.onError(error);
webSocket.request(1);
}
});

Expand Down

1 comment on commit cdbe9c6

@joerg1985
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the javadoc: An error has occurred. This is the last invocation from the specified WebSocket. therefore it does not make any sense to request further invocations.
The default implementation of the interface does also not call the .request and this call might get us into trouble.

Please sign in to comment.