mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-23 15:00:37 +01:00
Dependency update; re-use Thread.MAX_PRIORITY for Spigot; other network optimizations
This commit is contained in:
parent
7fe7dc1d70
commit
0069566803
3 changed files with 10 additions and 6 deletions
|
@ -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();
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.CloudburstMC.Protocol</groupId>
|
||||
<artifactId>bedrock-v448</artifactId>
|
||||
<version>6ce2f6e</version>
|
||||
<version>6b48673</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -169,7 +169,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.GeyserMC</groupId>
|
||||
<artifactId>PacketLib</artifactId>
|
||||
<version>86c9c38</version>
|
||||
<version>9d4b476</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue