Skip to content

Commit

Permalink
Merge pull request quarkusio#41413 from mkouba/ws-next-closing-strate…
Browse files Browse the repository at this point in the history
…gy-fix

WebSockets Next: fix the default unhandled-failure-strategy
  • Loading branch information
mkouba committed Jun 25, 2024
2 parents 0484069 + 0f64a36 commit a1b3a14
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ private static void handleFailure(UnhandledFailureStrategy strategy, Throwable c
}

private static void closeConnection(Throwable cause, WebSocketConnectionBase connection) {
if (connection.isClosed()) {
return;
}
connection.close(CloseReason.INTERNAL_SERVER_ERROR).subscribe().with(
v -> LOG.debugf("Connection closed due to unhandled failure %s: %s", cause, connection),
t -> LOG.errorf("Unable to close connection [%s] due to unhandled failure [%s]: %s", connection.id(), cause,
Expand Down

0 comments on commit a1b3a14

Please sign in to comment.