Strictly disconnect on all exceptions

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
This commit is contained in:
Joshua Castle 2024-05-22 23:27:13 -07:00
parent ab007d98df
commit a97f9d7dbc
No known key found for this signature in database
GPG key ID: 7ECA1A2FC38ABA9F

View file

@ -47,7 +47,9 @@ public class InvalidPacketHandler extends ChannelInboundHandlerAdapter {
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;
}