mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-29 07:04:51 +02:00
Clear Packet Queue on Disconnect
By: md_5 <git@md-5.net>
This commit is contained in:
parent
c4f3fcfce9
commit
93fea68749
2 changed files with 9 additions and 1 deletions
paper-server/patches/sources/net/minecraft
|
@ -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…
Add table
Reference in a new issue