Work around ByteToMessageDecoder trying to be send more messages upstream when we wanted to discard them altogether

This commit is contained in:
Andrew Steinborn
2020-07-15 16:52:48 -04:00
parent ce74dcc483
commit 98f1faf759

View File

@@ -37,6 +37,10 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf> {
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception {
if (!ctx.channel().isActive()) {
return;
}
if (!msg.isReadable()) {
return;
}