mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-29 04:28:21 +01:00
Framed packet cleanup 4
This commit is contained in:
parent
aaa012a975
commit
96fe9f1063
@ -239,11 +239,9 @@ public final class PacketUtils {
|
||||
Utils.overrideVarIntHeader(buffer, dataLengthIndex, uncompressedLength);
|
||||
if (uncompressedLength > 0) {
|
||||
// Packet large enough, compress
|
||||
final VelocityCompressor compressor = COMPRESSOR.get();
|
||||
// Compress id + payload
|
||||
ByteBuf uncompressedCopy = buffer.copy(contentIndex, packetSize);
|
||||
buffer.writerIndex(contentIndex);
|
||||
compress(compressor, uncompressedCopy, buffer);
|
||||
compress(COMPRESSOR.get(), uncompressedCopy, buffer);
|
||||
uncompressedCopy.release();
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user