From ebd0fcc6b1e45f152b5a7fbc5c85e320087d3fec Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 13 Jun 2021 04:00:48 -0400 Subject: [PATCH] Remove unnecessary slicing of uncompressed packets --- .../proxy/protocol/netty/MinecraftCompressDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressDecoder.java index b03451feb..ccadf9d72 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressDecoder.java @@ -50,7 +50,7 @@ public class MinecraftCompressDecoder extends MessageToMessageDecoder { int claimedUncompressedSize = ProtocolUtils.readVarInt(in); if (claimedUncompressedSize == 0) { // This message is not compressed. - out.add(in.retainedSlice()); + out.add(in.retain()); return; }