diff --git a/src/main/kotlin/com/github/creeper123123321/viaaas/CloudCodec.kt b/src/main/kotlin/com/github/creeper123123321/viaaas/CloudCodec.kt index d08306b..707b609 100644 --- a/src/main/kotlin/com/github/creeper123123321/viaaas/CloudCodec.kt +++ b/src/main/kotlin/com/github/creeper123123321/viaaas/CloudCodec.kt @@ -184,7 +184,7 @@ class CloudViaCodec(val info: UserConnection) : MessageToMessageCodec) { - 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