Correctly handle 0-length packet

This commit is contained in:
Andrew Steinborn
2019-09-17 09:33:43 -04:00
parent 009c9afe09
commit 8dea7567d8

View File

@@ -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) {