mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Use legacy DefaultEventLoopGroup constructor; label Geyser <-> Spigot connection thread
This commit is contained in:
parent
61d95200e3
commit
76399881a3
2 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue