13
0
geforkt von Mirrors/Paper

SPIGOT-4868: Server deadlock on /stop command

Dieser Commit ist enthalten in:
md_5 2019-05-05 09:25:51 +10:00
Ursprung 68e72f630e
Commit 4e60dbe7e4

Datei anzeigen

@ -4,7 +4,7 @@
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
if (!iasynctaskhandler.isMainThread()) {
iasynctaskhandler.execute(() -> {
+ if (MinecraftServer.getServer().isStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) return; // CraftBukkit, MC-142590
+ if (MinecraftServer.getServer().hasStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) return; // CraftBukkit, MC-142590
packet.a(t0);
});
throw CancelledPacketHandleException.INSTANCE;