diff --git a/CHANGELOG.md b/CHANGELOG.md index e8128258b..55082a64e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,7 @@ Unless otherwise specified, any version comparison below is the comparison of se maintainability of the project. - Introduced better names for some of the fields in `PlayerAuthInputPacketProcessor`, this improved the readability of the code. +- Disabled packet limit only in dev build. ### Fixed diff --git a/server/src/main/java/org/allaymc/server/network/AllayNetworkInterface.java b/server/src/main/java/org/allaymc/server/network/AllayNetworkInterface.java index cea917b8d..2244cd8fe 100644 --- a/server/src/main/java/org/allaymc/server/network/AllayNetworkInterface.java +++ b/server/src/main/java/org/allaymc/server/network/AllayNetworkInterface.java @@ -15,6 +15,7 @@ import io.netty.channel.socket.DatagramChannel; import io.netty.channel.socket.nio.NioDatagramChannel; import lombok.extern.slf4j.Slf4j; +import org.allaymc.api.AllayAPI; import org.allaymc.api.entity.type.EntityTypes; import org.allaymc.api.eventbus.event.network.ClientConnectEvent; import org.allaymc.api.i18n.I18n; @@ -75,7 +76,7 @@ public void start() { this.channel = new ServerBootstrap() .channelFactory(RakChannelFactory.server(datagramChannelClass)) .option(RakChannelOption.RAK_ADVERTISEMENT, pong.toByteBuf()) - .option(RakChannelOption.RAK_PACKET_LIMIT, 1000) // This option fixed localhost blocking address + .option(RakChannelOption.RAK_PACKET_LIMIT, AllayAPI.getInstance().isDevBuild() ? Integer.MAX_VALUE : 120) // This option fixed localhost blocking address .group(eventLoopGroup) .childHandler(new BedrockServerInitializer() { @Override