Bug / Send upgraded (duplicate) packets to phone if the queue removal failed. (#8148)

* Add seenRecently = true if wasUpgraded is true but unable to remove from queue (i.e. already sent/processed).

* Consistent comment between FloodingRouter and HopRouter
This commit is contained in:
Clive Blackledge 2025-09-28 14:42:51 -07:00 committed by Ben Meadors
parent a15d654767
commit a1c658a467
2 changed files with 8 additions and 0 deletions

View File

@ -54,6 +54,10 @@ bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
// We already enqueued the improved copy, so make sure the incoming packet stops here. // We already enqueued the improved copy, so make sure the incoming packet stops here.
return true; return true;
} }
// No queue entry was replaced by this upgraded copy, so treat it as a duplicate to avoid
// delivering the same packet to applications/phone twice with different hop limits.
seenRecently = true;
} }
if (seenRecently) { if (seenRecently) {

View File

@ -64,6 +64,10 @@ bool NextHopRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
// We already enqueued the improved copy, so make sure the incoming packet stops here. // We already enqueued the improved copy, so make sure the incoming packet stops here.
return true; return true;
} }
// No queue entry was replaced by this upgraded copy, so treat it as a duplicate to avoid
// delivering the same packet to applications/phone twice with different hop limits.
seenRecently = true;
} }
if (seenRecently) { if (seenRecently) {