mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 06:58:11 +02:00
Don't allow sendPacket once disconnect has been processed.
This commit is contained in:
parent
8ae7fb531a
commit
d7307859fa
@ -1,4 +1,4 @@
|
||||
From edea113458ab413ab9c43ec7be3fa1382e45fece Mon Sep 17 00:00:00 2001
|
||||
From afb701ae339e92d7c574baec7d09a3b0affa123d Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Wed, 22 Jul 2015 19:04:37 +1000
|
||||
Subject: [PATCH] Clear Packet Queue on Disconnect
|
||||
@ -16,6 +16,19 @@ index 247973d..9d23c6c 100644
|
||||
} else {
|
||||
NetworkManager.g.warn("handleDisconnection() called twice");
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index dce0ac4..e380774 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -868,7 +868,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
- if (packet == null) {
|
||||
+ if (packet == null || this.processedDisconnect) { // Spigot
|
||||
return;
|
||||
} else if (packet instanceof PacketPlayOutSpawnPosition) {
|
||||
PacketPlayOutSpawnPosition packet6 = (PacketPlayOutSpawnPosition) packet;
|
||||
--
|
||||
2.1.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user