From 2cee1d6632ce7d3c3bd66921d4865ccb997b05e3 Mon Sep 17 00:00:00 2001 From: Sen Date: Mon, 26 May 2025 23:57:36 +0200 Subject: [PATCH] raise packet compression limit from 2 to 20mb --- common/src/main/java/common/network/CompressionDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/common/network/CompressionDecoder.java b/common/src/main/java/common/network/CompressionDecoder.java index c4b28db..702aa11 100755 --- a/common/src/main/java/common/network/CompressionDecoder.java +++ b/common/src/main/java/common/network/CompressionDecoder.java @@ -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);