Skip to content

Commit

Permalink
Strictly disconnect on all exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
  • Loading branch information
Kas-tle committed May 23, 2024
1 parent ab007d9 commit a97f9d7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E


if (!(rootCause instanceof IllegalArgumentException)) {
super.exceptionCaught(ctx, cause);
// Kick users that cause exceptions
session.getGeyser().getLogger().warning("Exception caught in session of" + session.bedrockUsername() + ": " + rootCause.getMessage());
session.disconnect("An internal error occurred!");
return;
}

Expand Down

0 comments on commit a97f9d7

Please sign in to comment.