remove 4MB buffer size limit due to protocol changes

This commit is contained in:
Shane Freeder 2021-07-09 20:38:23 +01:00
parent dc044fb909
commit f17de7472d
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
2 changed files with 1 additions and 34 deletions

View File

@ -1,4 +1,4 @@
From f9db6489a6b0b0d77a13ebebb2a67f321d346ea4 Mon Sep 17 00:00:00 2001
From 5deaeab7db1364d5ff2125d569af60c3e90072c2 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 9 Jul 2021 13:20:36 +0100
Subject: [PATCH] Don't bother locking to fetch a v4 UUID from the offline

View File

@ -1,33 +0,0 @@
From 93a9757046c606b5564332e6cb16719bc909dd92 Mon Sep 17 00:00:00 2001
From: Andrew Steinborn <git@steinborn.me>
Date: Sat, 24 Apr 2021 17:52:33 +0100
Subject: [PATCH] Set Netty pooled buffer size to 4MB
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java b/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
index 0db3d76a..35680528 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
@@ -26,6 +26,19 @@ public class BungeeCordLauncher
System.setProperty( "jdk.util.jar.enableMultiRelease", "force" );
}
+ // Waterfall start
+ // By default, Netty allocates 16MiB arenas for the PooledByteBufAllocator. This is too much
+ // memory for Minecraft, which imposes a maximum packet size of 2MiB! We'll use 4MiB as a more
+ // sane default.
+ //
+ // Note: io.netty.allocator.pageSize << io.netty.allocator.maxOrder is the formula used to
+ // compute the chunk size. We lower maxOrder from its default of 11 to 9. (We also use a null
+ // check, so that the user is free to choose another setting if need be.)
+ if (System.getProperty("io.netty.allocator.maxOrder") == null) {
+ System.setProperty("io.netty.allocator.maxOrder", "9");
+ }
+ // Waterfall end
+
OptionParser parser = new OptionParser();
parser.allowsUnrecognizedOptions();
parser.acceptsAll( Arrays.asList( "help" ), "Show the help" );
--
2.32.0