Revert "Another experiment for memory leaks: Create a brand-new buffer for passthrough uncompressed content"
This reverts commit92571a65db
. It looks likec3fab89bd7
nabbed it at last.
This commit is contained in:
@@ -29,8 +29,7 @@ public class MinecraftCompressDecoder extends MessageToMessageDecoder<ByteBuf> {
|
|||||||
int claimedUncompressedSize = ProtocolUtils.readVarInt(in);
|
int claimedUncompressedSize = ProtocolUtils.readVarInt(in);
|
||||||
if (claimedUncompressedSize == 0) {
|
if (claimedUncompressedSize == 0) {
|
||||||
// Strip the now-useless uncompressed size, this message is already uncompressed.
|
// Strip the now-useless uncompressed size, this message is already uncompressed.
|
||||||
out.add(in.copy());
|
out.add(in.retainedSlice());
|
||||||
in.skipBytes(in.readableBytes());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user