mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-07 16:12:02 +01:00
Clear Packet Queue on Disconnect
By: md_5 <git@md-5.net>
This commit is contained in:
parent
c4f3fcfce9
commit
93fea68749
@ -73,3 +73,11 @@
|
||||
public void write(ChannelHandlerContext channelhandlercontext, Object object, ChannelPromise channelpromise) throws Exception {
|
||||
super.write(channelhandlercontext, object, channelpromise);
|
||||
}
|
||||
@@ -661,6 +674,7 @@
|
||||
|
||||
packetlistener1.onDisconnect(disconnectiondetails);
|
||||
}
|
||||
+ this.pendingActions.clear(); // Free up packet queue.
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,7 @@
|
||||
|
||||
public void send(Packet<?> packet, @Nullable PacketSendListener callbacks) {
|
||||
+ // CraftBukkit start
|
||||
+ if (packet == null) {
|
||||
+ if (packet == null || this.processedDisconnect) { // Spigot
|
||||
+ return;
|
||||
+ } else if (packet instanceof ClientboundSetDefaultSpawnPositionPacket) {
|
||||
+ ClientboundSetDefaultSpawnPositionPacket packet6 = (ClientboundSetDefaultSpawnPositionPacket) packet;
|
||||
|
Loading…
Reference in New Issue
Block a user