checkOutgoingPacket

This commit is contained in:
creeper123123321 2021-02-02 21:16:01 -03:00 committed by GitHub
parent 2565ff5f74
commit 2eb2871eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,7 +184,7 @@ class CloudViaCodec(val info: UserConnection) : MessageToMessageCodec<ByteBuf, B
}
override fun encode(ctx: ChannelHandlerContext, bytebuf: ByteBuf, out: MutableList<Any>) {
info.checkOutgoingPacket()
if (!info.checkOutgoingPacket()) throw CancelEncoderException.generate(null)
if (!info.shouldTransformPacket()) {
out.add(bytebuf.retain())
return
@ -197,4 +197,4 @@ class CloudViaCodec(val info: UserConnection) : MessageToMessageCodec<ByteBuf, B
transformedBuf.release()
}
}
}
}