aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0818-Fix-player-kick-on-shutdown.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0818-Fix-player-kick-on-shutdown.patch')
-rw-r--r--patches/server/0818-Fix-player-kick-on-shutdown.patch23
1 files changed, 0 insertions, 23 deletions
diff --git a/patches/server/0818-Fix-player-kick-on-shutdown.patch b/patches/server/0818-Fix-player-kick-on-shutdown.patch
deleted file mode 100644
index 6b694a6abe..0000000000
--- a/patches/server/0818-Fix-player-kick-on-shutdown.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Denery <[email protected]>
-Date: Sun, 6 Nov 2022 02:02:46 +0300
-Subject: [PATCH] Fix player kick on shutdown
-
-Fix preemptive player kick on a server shutdown.
-If you update minecraft version / upstream and something is changed in this method make sure that a server doesn't disconnect a player preemptively,
-also check if all packets are ignored during the shutdown process.
-See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable)
-
-diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-index b7ffab0284b0bccd79775b8d03c8b2e088f91d1d..4202c48ad8f8e85ef46d1bd446ab28f3f4b083d1 100644
---- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-@@ -26,7 +26,7 @@ public class PacketUtils {
-
- public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T listener, BlockableEventLoop<?> engine) throws RunningOnDifferentThreadException {
- if (!engine.isSameThread()) {
-- engine.executeIfPossible(() -> {
-+ engine.execute(() -> { // Paper - Fix preemptive player kick on a server shutdown
- if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
- if (listener.shouldHandleMessage(packet)) {
- co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings