From 8dea7567d828d1f0e549da4b985d0f1d64271ad7 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 17 Sep 2019 09:33:43 -0400 Subject: [PATCH] Correctly handle 0-length packet --- .../proxy/protocol/netty/MinecraftVarintFrameDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftVarintFrameDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftVarintFrameDecoder.java index 01010fa82..66356dc5a 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftVarintFrameDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftVarintFrameDecoder.java @@ -24,7 +24,7 @@ public class MinecraftVarintFrameDecoder extends ByteToMessageDecoder { in.readerIndex(lastReaderIndex); int packetLength = ProtocolUtils.readVarInt(in); if (packetLength == 0) { - break find_packets; + continue find_packets; } if (in.readableBytes() < packetLength) {