mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-02-10 00:41:56 +01:00
oops
This commit is contained in:
parent
9df02816f2
commit
e76f7f7118
@ -17,7 +17,7 @@ class CompressionCodec(val threshold: Int) : MessageToMessageCodec<ByteBuf, Byte
|
||||
override fun encode(ctx: ChannelHandlerContext, input: ByteBuf, out: MutableList<Any>) {
|
||||
val frameLength = input.readableBytes()
|
||||
val outBuf = ctx.alloc().buffer()
|
||||
outBuf.skipBytes(5) // reserve varint
|
||||
|
||||
try {
|
||||
if (frameLength < threshold) {
|
||||
outBuf.writeByte(0)
|
||||
@ -69,4 +69,4 @@ class CompressionCodec(val threshold: Int) : MessageToMessageCodec<ByteBuf, Byte
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user