1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

Bump netty, re-enable adaptive allocator

This commit is contained in:
onebeastchris
2025-10-20 15:10:48 +02:00
parent 47ca26d680
commit 6ad1105ed6
4 changed files with 3 additions and 18 deletions

View File

@@ -25,8 +25,6 @@
package org.geysermc.geyser.platform.bungeecord;
import io.netty.buffer.AdaptiveByteBufAllocator;
import io.netty.buffer.ByteBufAllocator;
import io.netty.channel.Channel;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.CommandSender;
@@ -84,12 +82,9 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
public void onGeyserInitialize() {
GeyserLocale.init(this);
// TODO remove when this isn't an issue anymore
boolean adaptiveAllocatorUsed = System.getProperty("io.netty.allocator.type") == null && ByteBufAllocator.DEFAULT instanceof AdaptiveByteBufAllocator;
try {
List<Integer> supportedProtocols = ProtocolConstants.SUPPORTED_VERSION_IDS;
if (!supportedProtocols.contains(GameProtocol.getJavaProtocolVersion()) || adaptiveAllocatorUsed) {
if (!supportedProtocols.contains(GameProtocol.getJavaProtocolVersion())) {
geyserLogger.error(" / \\");
geyserLogger.error(" / \\");
geyserLogger.error(" / | \\");

View File

@@ -89,11 +89,6 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); // Can eat performance
}
// Restore allocator used before Netty 4.2 due to oom issues with the adaptive allocator
if (System.getProperty("io.netty.allocator.type") == null) {
System.setProperty("io.netty.allocator.type", "pooled");
}
System.setProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager");
GeyserStandaloneLogger.setupStreams();

View File

@@ -36,8 +36,6 @@ import com.velocitypowered.api.network.ProtocolVersion;
import com.velocitypowered.api.plugin.Plugin;
import com.velocitypowered.api.plugin.PluginContainer;
import com.velocitypowered.api.proxy.ProxyServer;
import io.netty.buffer.AdaptiveByteBufAllocator;
import io.netty.buffer.ByteBufAllocator;
import lombok.Getter;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -93,10 +91,7 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
public void onGeyserInitialize() {
GeyserLocale.init(this);
// TODO remove when this isn't an issue anymore
boolean adaptiveAllocatorUsed = System.getProperty("io.netty.allocator.type") == null && ByteBufAllocator.DEFAULT instanceof AdaptiveByteBufAllocator;
if (!ProtocolVersion.isSupported(GameProtocol.getJavaProtocolVersion()) || adaptiveAllocatorUsed) {
if (!ProtocolVersion.isSupported(GameProtocol.getJavaProtocolVersion())) {
geyserLogger.error(" / \\");
geyserLogger.error(" / \\");
geyserLogger.error(" / | \\");

View File

@@ -5,7 +5,7 @@ erosion = "1.1-20240521.000109-3"
events = "1.1-SNAPSHOT"
jackson = "2.17.0"
fastutil = "8.5.15-SNAPSHOT"
netty = "4.2.3.Final"
netty = "4.2.7.Final"
guava = "29.0-jre"
gson = "2.3.1" # Provided by Spigot 1.8.8
websocket = "1.5.1"