Compare commits

...

3 Commits

Author SHA1 Message Date
Maurice Eisenblätter c11b074048
Merge 55a32b5c0f into 6f057b361b 2024-04-07 10:13:17 -05:00
Dan Mulloy 6f057b361b
Bump version to 5.2.0 for release 2024-04-07 10:04:32 -05:00
Maurice Eisenblätter 55a32b5c0f
fix: start processing further packets if a packet is done 2023-09-27 20:32:27 +02:00
2 changed files with 12 additions and 5 deletions

View File

@ -5,7 +5,7 @@ plugins {
} }
group = 'com.comphenix.protocol' group = 'com.comphenix.protocol'
version = '5.2.0-SNAPSHOT' version = '5.2.0'
description = 'Provides access to the Minecraft protocol' description = 'Provides access to the Minecraft protocol'
def isSnapshot = version.endsWith('-SNAPSHOT') def isSnapshot = version.endsWith('-SNAPSHOT')

View File

@ -428,7 +428,7 @@ public class AsyncFilterManager implements AsynchronousManager {
} }
// There are no more listeners - queue the packet for transmission // There are no more listeners - queue the packet for transmission
signalFreeProcessingSlot(packet); signalFreeProcessingSlot(packet, onMainThread);
PacketSendingQueue queue = getSendingQueue(packet, false); PacketSendingQueue queue = getSendingQueue(packet, false);
@ -467,11 +467,18 @@ public class AsyncFilterManager implements AsynchronousManager {
} }
/** /**
* Signal that a packet has finished processing. * Signal that a packet has finished processing. Tries to process further packets
* if a processing slot is still free.
* @param packet - packet to signal. * @param packet - packet to signal.
* @param onMainThread whether or not this method was run by the main thread.
*/ */
public void signalFreeProcessingSlot(PacketEvent packet) { public void signalFreeProcessingSlot(PacketEvent packet, boolean onMainThread) {
getProcessingQueue(packet).signalProcessingDone(); PacketProcessingQueue queue = getProcessingQueue(packet);
// mark slot as done
queue.signalProcessingDone();
// start processing next slot if possible
queue.signalBeginProcessing(onMainThread);
} }
/** /**