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:
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
package org.geysermc.geyser.platform.bungeecord;
|
package org.geysermc.geyser.platform.bungeecord;
|
||||||
|
|
||||||
import io.netty.buffer.AdaptiveByteBufAllocator;
|
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
@@ -84,12 +82,9 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap {
|
|||||||
public void onGeyserInitialize() {
|
public void onGeyserInitialize() {
|
||||||
GeyserLocale.init(this);
|
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 {
|
try {
|
||||||
List<Integer> supportedProtocols = ProtocolConstants.SUPPORTED_VERSION_IDS;
|
List<Integer> supportedProtocols = ProtocolConstants.SUPPORTED_VERSION_IDS;
|
||||||
if (!supportedProtocols.contains(GameProtocol.getJavaProtocolVersion()) || adaptiveAllocatorUsed) {
|
if (!supportedProtocols.contains(GameProtocol.getJavaProtocolVersion())) {
|
||||||
geyserLogger.error(" / \\");
|
geyserLogger.error(" / \\");
|
||||||
geyserLogger.error(" / \\");
|
geyserLogger.error(" / \\");
|
||||||
geyserLogger.error(" / | \\");
|
geyserLogger.error(" / | \\");
|
||||||
|
|||||||
@@ -89,11 +89,6 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
|
|||||||
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); // Can eat performance
|
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");
|
System.setProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager");
|
||||||
GeyserStandaloneLogger.setupStreams();
|
GeyserStandaloneLogger.setupStreams();
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ import com.velocitypowered.api.network.ProtocolVersion;
|
|||||||
import com.velocitypowered.api.plugin.Plugin;
|
import com.velocitypowered.api.plugin.Plugin;
|
||||||
import com.velocitypowered.api.plugin.PluginContainer;
|
import com.velocitypowered.api.plugin.PluginContainer;
|
||||||
import com.velocitypowered.api.proxy.ProxyServer;
|
import com.velocitypowered.api.proxy.ProxyServer;
|
||||||
import io.netty.buffer.AdaptiveByteBufAllocator;
|
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
@@ -93,10 +91,7 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
|||||||
public void onGeyserInitialize() {
|
public void onGeyserInitialize() {
|
||||||
GeyserLocale.init(this);
|
GeyserLocale.init(this);
|
||||||
|
|
||||||
// TODO remove when this isn't an issue anymore
|
if (!ProtocolVersion.isSupported(GameProtocol.getJavaProtocolVersion())) {
|
||||||
boolean adaptiveAllocatorUsed = System.getProperty("io.netty.allocator.type") == null && ByteBufAllocator.DEFAULT instanceof AdaptiveByteBufAllocator;
|
|
||||||
|
|
||||||
if (!ProtocolVersion.isSupported(GameProtocol.getJavaProtocolVersion()) || adaptiveAllocatorUsed) {
|
|
||||||
geyserLogger.error(" / \\");
|
geyserLogger.error(" / \\");
|
||||||
geyserLogger.error(" / \\");
|
geyserLogger.error(" / \\");
|
||||||
geyserLogger.error(" / | \\");
|
geyserLogger.error(" / | \\");
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ erosion = "1.1-20240521.000109-3"
|
|||||||
events = "1.1-SNAPSHOT"
|
events = "1.1-SNAPSHOT"
|
||||||
jackson = "2.17.0"
|
jackson = "2.17.0"
|
||||||
fastutil = "8.5.15-SNAPSHOT"
|
fastutil = "8.5.15-SNAPSHOT"
|
||||||
netty = "4.2.3.Final"
|
netty = "4.2.7.Final"
|
||||||
guava = "29.0-jre"
|
guava = "29.0-jre"
|
||||||
gson = "2.3.1" # Provided by Spigot 1.8.8
|
gson = "2.3.1" # Provided by Spigot 1.8.8
|
||||||
websocket = "1.5.1"
|
websocket = "1.5.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user