From 8ae7fb531af878a81ca36fdf3a82a2817a02b18c Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 22 Jul 2015 19:04:46 +1000 Subject: [PATCH] Clear Packet Queue on Disconnect --- ...157-Clear-Packet-Queue-on-Disconnect.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CraftBukkit-Patches/0157-Clear-Packet-Queue-on-Disconnect.patch diff --git a/CraftBukkit-Patches/0157-Clear-Packet-Queue-on-Disconnect.patch b/CraftBukkit-Patches/0157-Clear-Packet-Queue-on-Disconnect.patch new file mode 100644 index 0000000..e58a110 --- /dev/null +++ b/CraftBukkit-Patches/0157-Clear-Packet-Queue-on-Disconnect.patch @@ -0,0 +1,21 @@ +From edea113458ab413ab9c43ec7be3fa1382e45fece Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Wed, 22 Jul 2015 19:04:37 +1000 +Subject: [PATCH] Clear Packet Queue on Disconnect + + +diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java +index 247973d..9d23c6c 100644 +--- a/src/main/java/net/minecraft/server/NetworkManager.java ++++ b/src/main/java/net/minecraft/server/NetworkManager.java +@@ -313,6 +313,7 @@ public class NetworkManager extends SimpleChannelInboundHandler { + } else if (this.getPacketListener() != null) { + this.getPacketListener().a(new ChatComponentText("Disconnected")); + } ++ this.i.clear(); // Free up packet queue. + } else { + NetworkManager.g.warn("handleDisconnection() called twice"); + } +-- +2.1.4 +