Skip to content

Commit

Permalink
Fix nullpointer on null code ws-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Canava committed Nov 14, 2024
1 parent 7fa4088 commit 1069847
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ public void handle(Void event) {
trafficLogger.connectionClosed(connection);
}
if (closeHandler != null) {
doExecute(connection, new CloseReason(ws.closeStatusCode(), ws.closeReason()), closeHandler);
CloseReason reason = CloseReason.INTERNAL_SERVER_ERROR;
if (ws.closeStatusCode() != null) {
reason = new CloseReason(ws.closeStatusCode(), ws.closeReason());
}
doExecute(connection, reason, closeHandler);
}
connectionManager.remove(BasicWebSocketConnectorImpl.class.getName(), connection);
client.get().close();
Expand Down

0 comments on commit 1069847

Please sign in to comment.