mirror of
https://github.com/PaperMC/Velocity.git
synced 2025-01-30 14:59:39 +08:00
Properly fix debug logging
This commit is contained in:
parent
b2d9e11217
commit
6cec09974a
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user