From 98f1faf7598f5e43558e2de14fb44799acccf9d4 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Wed, 15 Jul 2020 16:52:48 -0400 Subject: [PATCH] Work around ByteToMessageDecoder trying to be send more messages upstream when we wanted to discard them altogether --- .../proxy/protocol/netty/MinecraftDecoder.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java index c37fef224..caaf67f66 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftDecoder.java @@ -37,6 +37,10 @@ public class MinecraftDecoder extends MessageToMessageDecoder { @Override protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List out) throws Exception { + if (!ctx.channel().isActive()) { + return; + } + if (!msg.isReadable()) { return; }