mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-4868: Server deadlock on /stop command
By: md_5 <git@md-5.net>
This commit is contained in:
parent
5a40b00a62
commit
f3d2f9c5c0
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue