mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
Only stop retransmissions when receiving implicit ACK over LoRa (#7872)
* Only stop retransmissions when receiving implicit ACK over LoRa * trunk fmt
This commit is contained in:
@@ -34,8 +34,11 @@ bool NextHopRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
|||||||
bool weWereNextHop = false;
|
bool weWereNextHop = false;
|
||||||
if (wasSeenRecently(p, true, &wasFallback, &weWereNextHop)) { // Note: this will also add a recent packet record
|
if (wasSeenRecently(p, true, &wasFallback, &weWereNextHop)) { // Note: this will also add a recent packet record
|
||||||
printPacket("Ignore dupe incoming msg", p);
|
printPacket("Ignore dupe incoming msg", p);
|
||||||
|
|
||||||
|
if (p->transport_mechanism == meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA) {
|
||||||
rxDupe++;
|
rxDupe++;
|
||||||
stopRetransmission(p->from, p->id);
|
stopRetransmission(p->from, p->id);
|
||||||
|
}
|
||||||
|
|
||||||
// If it was a fallback to flooding, try to relay again
|
// If it was a fallback to flooding, try to relay again
|
||||||
if (wasFallback) {
|
if (wasFallback) {
|
||||||
|
|||||||
@@ -58,7 +58,10 @@ bool ReliableRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
|||||||
// marked as wantAck
|
// marked as wantAck
|
||||||
sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, old->packet->channel);
|
sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, old->packet->channel);
|
||||||
|
|
||||||
|
// Only stop retransmissions if the rebroadcast came via LoRa
|
||||||
|
if (p->transport_mechanism == meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA) {
|
||||||
stopRetransmission(key);
|
stopRetransmission(key);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_DEBUG("Didn't find pending packet");
|
LOG_DEBUG("Didn't find pending packet");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user