From 463a46ccc0e1ef352d5eef4eb1fe638e82fe2439 Mon Sep 17 00:00:00 2001 From: TheMode Date: Wed, 1 Sep 2021 18:21:51 +0200 Subject: [PATCH] Set socket size to max packet size Signed-off-by: TheMode --- src/main/java/net/minestom/server/network/socket/Server.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/network/socket/Server.java b/src/main/java/net/minestom/server/network/socket/Server.java index 36ad7a262..2725fac9f 100644 --- a/src/main/java/net/minestom/server/network/socket/Server.java +++ b/src/main/java/net/minestom/server/network/socket/Server.java @@ -18,8 +18,8 @@ public final class Server { public static final Logger LOGGER = LoggerFactory.getLogger(Server.class); public static final int WORKER_COUNT = Integer.getInteger("minestom.workers", Runtime.getRuntime().availableProcessors()); - public static final int SOCKET_BUFFER_SIZE = Integer.getInteger("minestom.buffer-size", 1_048_575); public static final int MAX_PACKET_SIZE = 2_097_151; // 3 bytes var-int + public static final int SOCKET_BUFFER_SIZE = Integer.getInteger("minestom.buffer-size", MAX_PACKET_SIZE); public static final boolean NO_DELAY = true; private volatile boolean stop;