3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-04 23:30:17 +01:00

Use legacy DefaultEventLoopGroup constructor; label Geyser <-> Spigot connection thread

Dieser Commit ist enthalten in:
Camotoy 2021-08-16 22:33:14 -04:00
Ursprung 61d95200e3
Commit 76399881a3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -30,6 +30,7 @@ import com.viaversion.viaversion.bukkit.handlers.BukkitChannelInitializer;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.*;
import io.netty.channel.local.LocalAddress;
import io.netty.util.concurrent.DefaultThreadFactory;
import org.bukkit.Bukkit;
import org.geysermc.connector.bootstrap.GeyserBootstrap;
import org.geysermc.connector.common.GeyserInjector;
@ -117,7 +118,7 @@ public class GeyserSpigotInjector extends GeyserInjector {
initChannel.invoke(childHandler, ch);
}
})
.group(new DefaultEventLoopGroup())
.group(new DefaultEventLoopGroup(0, new DefaultThreadFactory("Geyser Spigot connection thread")))
.localAddress(LocalAddress.ANY))
.bind()
.syncUninterruptibly();

Datei anzeigen

@ -58,7 +58,8 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
private static final int MAGIC_RAKNET_LENGTH = 338;
private final GeyserConnector connector;
private final DefaultEventLoopGroup eventLoopGroup = new DefaultEventLoopGroup(new DefaultThreadFactory("Geyser player thread"));
// There is a constructor that doesn't require inputting threads, but older Netty versions don't have it
private final DefaultEventLoopGroup eventLoopGroup = new DefaultEventLoopGroup(0, new DefaultThreadFactory("Geyser player thread"));
public ConnectorServerEventHandler(GeyserConnector connector) {
this.connector = connector;