From 6cec09974a99b06b083cf019bad4f489b10e1380 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 6 Aug 2020 11:09:11 -0400 Subject: [PATCH] Properly fix debug logging --- .../proxy/connection/MinecraftConnection.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java index e99ddf212..70de89673 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java @@ -157,12 +157,12 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter { logger.error("{}: read timed out", association); } else { boolean isQuietDecoderException = cause instanceof QuietDecoderException; - boolean willLogQuietDecoderException = MinecraftDecoder.DEBUG || (isQuietDecoderException - && !(sessionHandler instanceof LoginSessionHandler) + boolean willLogQuietDecoderException = !isQuietDecoderException + || (!(sessionHandler instanceof LoginSessionHandler) && !(sessionHandler instanceof HandshakeSessionHandler)); if (willLogQuietDecoderException) { logger.error("{}: exception encountered in {}", association, sessionHandler, cause); - } else if (isQuietDecoderException) { + } else { knownDisconnect = true; } }