raise packet compression limit from 2 to 20mb

This commit is contained in:
Sen 2025-05-26 23:57:36 +02:00
parent 435e3f3e29
commit 2cee1d6632
Signed by: sen
GPG key ID: 3AC50A6F47D1B722

View file

@ -30,8 +30,8 @@ public class CompressionDecoder extends ByteToMessageDecoder {
}
if(len < this.treshold)
throw new DecoderException("Badly compressed packet - size of " + len + " is below server threshold of " + this.treshold);
if(len > 2097152)
throw new DecoderException("Badly compressed packet - size of " + len + " is larger than protocol maximum of " + 2097152);
if(len > 20971520)
throw new DecoderException("Badly compressed packet - size of " + len + " is larger than protocol maximum of " + 20971520);
byte[] comp = new byte[pbuf.readableBytes()];
pbuf.readBytes(comp);
this.inflater.setInput(comp);