mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-02 16:49:37 +01:00
fix decoder
This commit is contained in:
parent
485f4fa070
commit
bcb76350a1
@ -34,14 +34,14 @@ public class VelocityDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
|||||||
|
|
||||||
ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
|
ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
|
||||||
try {
|
try {
|
||||||
boolean needsCompress = handleCompressionOrder(ctx, bytebuf);
|
boolean needsCompress = handleCompressionOrder(ctx, transformedBuf);
|
||||||
|
|
||||||
info.transformIncoming(bytebuf, CancelDecoderException::generate);
|
info.transformIncoming(transformedBuf, CancelDecoderException::generate);
|
||||||
|
|
||||||
if (needsCompress) {
|
if (needsCompress) {
|
||||||
recompress(ctx, bytebuf);
|
recompress(ctx, transformedBuf);
|
||||||
}
|
}
|
||||||
out.add(bytebuf.retain());
|
out.add(transformedBuf.retain());
|
||||||
} finally {
|
} finally {
|
||||||
transformedBuf.release();
|
transformedBuf.release();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user