diff --git a/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotInjector.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotInjector.java index 14065c52e..5b6e259f5 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotInjector.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotInjector.java @@ -118,7 +118,8 @@ public class GeyserSpigotInjector extends GeyserInjector { initChannel.invoke(childHandler, ch); } }) - .group(new DefaultEventLoopGroup(0, new DefaultThreadFactory("Geyser Spigot connection thread"))) + // Set to MAX_PRIORITY as MultithreadEventLoopGroup#newDefaultThreadFactory which DefaultEventLoopGroup implements does by default + .group(new DefaultEventLoopGroup(0, new DefaultThreadFactory("Geyser Spigot connection thread", Thread.MAX_PRIORITY))) .localAddress(LocalAddress.ANY)) .bind() .syncUninterruptibly(); diff --git a/connector/pom.xml b/connector/pom.xml index 6b955ca21..81c9acdf8 100644 --- a/connector/pom.xml +++ b/connector/pom.xml @@ -115,7 +115,7 @@ com.github.CloudburstMC.Protocol bedrock-v448 - 6ce2f6e + 6b48673 compile @@ -169,7 +169,7 @@ com.github.GeyserMC PacketLib - 86c9c38 + 9d4b476 compile diff --git a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java index 7d500ef20..bfa9af7cf 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java @@ -838,7 +838,7 @@ public class GeyserSession implements CommandSender { // This issue could be mitigated down the line by preventing Bungee from setting compression downstream.setFlag(BuiltinFlags.USE_ONLY_DIRECT_BUFFERS, connector.getPlatformType() == PlatformType.BUNGEECORD); - downstream.connectInternal(connector.getBootstrap().getSocketAddress(), upstream.getAddress().getAddress().getHostAddress(), true); + downstream.connectInternal(connector.getBootstrap().getSocketAddress(), upstream.getAddress().getAddress().getHostAddress()); internalConnect = true; } catch (Exception e) { e.printStackTrace(); @@ -1237,8 +1237,11 @@ public class GeyserSession implements CommandSender { if (!closed && this.downstream != null) { Channel channel = this.downstream.getChannel(); if (channel == null) { - // Channel is set to null when downstream is disconnected - there is a short window for this to happen - // as downstream doesn't call GeyserSession#disconnect + // Channel is only null before the connection has initialized + connector.getLogger().warning("Tried to send a packet to the Java server too early!"); + if (connector.getConfig().isDebugMode()) { + Thread.dumpStack(); + } return; }