13
0
geforkt von Mirrors/Velocity

Another experiment for memory leaks: Create a brand-new buffer for passthrough uncompressed content

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-01-14 22:18:05 -05:00
Ursprung c14ceb315d
Commit 92571a65db

Datei anzeigen

@ -29,7 +29,8 @@ public class MinecraftCompressDecoder extends MessageToMessageDecoder<ByteBuf> {
int claimedUncompressedSize = ProtocolUtils.readVarInt(in);
if (claimedUncompressedSize == 0) {
// Strip the now-useless uncompressed size, this message is already uncompressed.
out.add(in.retainedSlice());
out.add(in.copy());
in.skipBytes(in.readableBytes());
return;
}