3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Remove unnecessary slicing of uncompressed packets

Dieser Commit ist enthalten in:
Andrew Steinborn 2021-06-13 04:00:48 -04:00
Ursprung c33f9e0466
Commit ebd0fcc6b1

Datei anzeigen

@ -50,7 +50,7 @@ public class MinecraftCompressDecoder extends MessageToMessageDecoder<ByteBuf> {
int claimedUncompressedSize = ProtocolUtils.readVarInt(in); int claimedUncompressedSize = ProtocolUtils.readVarInt(in);
if (claimedUncompressedSize == 0) { if (claimedUncompressedSize == 0) {
// This message is not compressed. // This message is not compressed.
out.add(in.retainedSlice()); out.add(in.retain());
return; return;
} }