mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-30 22:53:26 +01:00
Clear state related to a packet when its resent.
This commit is contained in:
parent
d746fcbf6c
commit
8e9c9951a9
@ -434,10 +434,13 @@ class ChannelInjector extends ByteToMessageDecoder {
|
|||||||
*/
|
*/
|
||||||
public void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered) {
|
public void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered) {
|
||||||
saveMarker(packet, marker);
|
saveMarker(packet, marker);
|
||||||
|
processedPackets.remove(packet);
|
||||||
|
|
||||||
// Record if this packet should be ignored by most listeners
|
// Record if this packet should be ignored by most listeners
|
||||||
if (!filtered) {
|
if (!filtered) {
|
||||||
ignoredPackets.add(packet);
|
ignoredPackets.add(packet);
|
||||||
|
} else {
|
||||||
|
ignoredPackets.remove(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attempt to send the packet with NetworkMarker.handle(), or the PlayerConnection if its active
|
// Attempt to send the packet with NetworkMarker.handle(), or the PlayerConnection if its active
|
||||||
@ -460,9 +463,12 @@ class ChannelInjector extends ByteToMessageDecoder {
|
|||||||
*/
|
*/
|
||||||
public void recieveClientPacket(Object packet, NetworkMarker marker, boolean filtered) {
|
public void recieveClientPacket(Object packet, NetworkMarker marker, boolean filtered) {
|
||||||
saveMarker(packet, marker);
|
saveMarker(packet, marker);
|
||||||
|
processedPackets.remove(packet);
|
||||||
|
|
||||||
if (!filtered) {
|
if (!filtered) {
|
||||||
ignoredPackets.add(packet);
|
ignoredPackets.add(packet);
|
||||||
|
} else {
|
||||||
|
ignoredPackets.remove(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user