mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-08 02:47:35 +00:00
Cancel rebroadcast in Tx queue upon receiving another rebroadcast (#2538)
* Make portduino great again * Upon receiving packet that was seen recently, cancel a rebroadcast if there was one in Tx queue already --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -21,6 +21,7 @@ bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
||||
{
|
||||
if (wasSeenRecently(p)) { // Note: this will also add a recent packet record
|
||||
printPacket("Ignoring incoming msg, because we've already seen it", p);
|
||||
Router::cancelSending(p->from, p->id); // cancel rebroadcast of this message *if* there was already one
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -62,4 +63,4 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
|
||||
}
|
||||
// handle the packet as normal
|
||||
Router::sniffReceived(p, c);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user