fix decoder

This commit is contained in:
creeper123123321 2020-06-30 16:31:42 -03:00 committed by Five (Xer)
parent 485f4fa070
commit bcb76350a1
No known key found for this signature in database
GPG Key ID: A3F306B10E6330E7

View File

@ -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();
} }