fix exception spam

This commit is contained in:
creeper123123321 2021-03-13 17:01:17 -03:00
parent cc80cb2643
commit 22d07a7ea7

View File

@ -8,10 +8,8 @@ import us.myles.ViaVersion.api.type.Type
class FrameCodec : ByteToMessageCodec<ByteBuf>() { class FrameCodec : ByteToMessageCodec<ByteBuf>() {
override fun decode(ctx: ChannelHandlerContext, input: ByteBuf, out: MutableList<Any>) { override fun decode(ctx: ChannelHandlerContext, input: ByteBuf, out: MutableList<Any>) {
if (!ctx.channel().isActive) { if (!ctx.channel().isActive) return
input.clear() // Ignore, should prevent DoS https://github.com/SpigotMC/BungeeCord/pull/2908 // Ignore, should prevent DoS https://github.com/SpigotMC/BungeeCord/pull/2908
return
}
val index = input.readerIndex() val index = input.readerIndex()
var nByte = 0 var nByte = 0