diff --git a/ChangeLog b/ChangeLog index 8ad4952..827ad9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ CHANGES v3.2.0 ------ +* Update Changelog for 3.2.0 * minor cleanup prior to release * Webchat: fix input maxlength * WebChat: cleanup some console.logs diff --git a/aprsd/packets/tracker.py b/aprsd/packets/tracker.py index e62706a..ac5d4b4 100644 --- a/aprsd/packets/tracker.py +++ b/aprsd/packets/tracker.py @@ -72,18 +72,17 @@ class PacketTrack(objectstore.ObjectStoreMixin): @wrapt.synchronized(lock) def add(self, packet): - key = int(packet.msgNo) + key = packet.msgNo self.data[key] = packet self.total_tracked += 1 @wrapt.synchronized(lock) - def get(self, id): - if id in self.data: - return self.data[id] + def get(self, key): + if key in self.data: + return self.data[key] @wrapt.synchronized(lock) - def remove(self, id): - key = int(id) + def remove(self, key): if key in self.data.keys(): del self.data[key] diff --git a/aprsd/threads/rx.py b/aprsd/threads/rx.py index 8387d16..2ee125f 100644 --- a/aprsd/threads/rx.py +++ b/aprsd/threads/rx.py @@ -70,8 +70,14 @@ class APRSDPluginRXThread(APRSDRXThread): packet = self._client.decode_packet(*args, **kwargs) # LOG.debug(raw) packet.log(header="RX") - packets.PacketList().rx(packet) - self.packet_queue.put(packet) + tracked = packets.PacketTrack().get(packet.msgNo) + if not tracked: + # If we are in the process of already ack'ing + # a packet, we should drop the packet + # because it's a dupe within the time that + # we send the 3 acks for the packet. + packets.PacketList().rx(packet) + self.packet_queue.put(packet) class APRSDProcessPacketThread(APRSDThread):