mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Send LOGIN protocol packets immediately - Fix disconnect during async prelogin
This commit is contained in:
parent
cd93e54df3
commit
57d6cc0158
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ This should solve some deadlock risks
|
|||
Part of this commit was authored by: Spottedleaf
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index b1dededc15cce686ead74a99bee64c89ac1de22c..d24d7df807287c51a8dd5ecf4f7c842b7cdf3976 100644
|
||||
index b1dededc15cce686ead74a99bee64c89ac1de22c..35085ca3992e7c21139540d0c404e1568f28a275 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -64,6 +64,10 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
@ -73,7 +73,7 @@ index b1dededc15cce686ead74a99bee64c89ac1de22c..d24d7df807287c51a8dd5ecf4f7c842b
|
|||
+ }
|
||||
+ // Paper start
|
||||
+ private static boolean canSendImmediate(NetworkManager networkManager, Packet<?> packet) {
|
||||
+ return networkManager.isPending || networkManager.protocol == EnumProtocol.HANDSHAKING || networkManager.protocol == EnumProtocol.STATUS || networkManager.queueImmunity ||
|
||||
+ return networkManager.isPending || networkManager.protocol != EnumProtocol.PLAY || networkManager.queueImmunity ||
|
||||
+ packet instanceof PacketPlayOutKeepAlive ||
|
||||
+ packet instanceof PacketPlayOutChat ||
|
||||
+ packet instanceof PacketPlayOutTabComplete;
|
||||
|
|
Loading…
Reference in a new issue