Do not schedule keepalive fail kick to main

There is no main thread to schedule to, and I've already
make disconnect() handle off-region kicks safely.
This commit is contained in:
Spottedleaf 2023-03-07 13:19:29 -08:00
parent 99429cee37
commit 7af86e656d

View File

@ -15677,7 +15677,7 @@ index abcc3266d18f34d160eac87fdea153dce24c60b8..7cf0619883577a0f21ed75ba70ece90d
Collections.shuffle( this.connections );
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3472f7f9b98d6d9c9f6465872803ef17fa67486d..e8e2d8e481ff798dc73bfdfe956cd7d9cabe4403 100644
index 3472f7f9b98d6d9c9f6465872803ef17fa67486d..97a762b08cd2609a8aa364c174c1167f79fb4d62 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -320,10 +320,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -16062,6 +16062,18 @@ index 3472f7f9b98d6d9c9f6465872803ef17fa67486d..e8e2d8e481ff798dc73bfdfe956cd7d9
}
private void updateSignText(ServerboundSignUpdatePacket packet, List<FilteredText> signText) {
@@ -3461,9 +3504,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.keepAlivePending = false;
} else if (!this.isSingleplayerOwner()) {
// Paper start - This needs to be handled on the main thread for plugins
- server.submit(() -> {
+ // Folia - region threading - do not schedule to main anymore, there is no main
this.disconnect(Component.translatable("disconnect.timeout"), org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); // Paper - kick event cause
- });
+ // Folia - region threading - do not schedule to main anymore, there is no main
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index a25306fe8a35bb70a490e6a0c01d0340bbc0d781..626d99c785d2886bce605ba468ee24ce1710beb2 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java