mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-22 04:58:01 +00:00
Start retransmissions in NextHopRouter if ReliableRouter didn't do it
This commit is contained in:
parent
3ea2918f7f
commit
360637c25d
@ -20,9 +20,9 @@ ErrorCode NextHopRouter::send(meshtastic_MeshPacket *p)
|
|||||||
p->next_hop = getNextHop(p->to, p->relay_node); // set the next hop
|
p->next_hop = getNextHop(p->to, p->relay_node); // set the next hop
|
||||||
LOG_DEBUG("Setting next hop for packet with dest %x to %x", p->to, p->next_hop);
|
LOG_DEBUG("Setting next hop for packet with dest %x to %x", p->to, p->next_hop);
|
||||||
|
|
||||||
// If it's from us, ReliableRouter already handles retransmissions. If a next hop is set and hop limit is not 0 or want_ack is
|
// If it's from us, ReliableRouter already handles retransmissions if want_ack is set. If a next hop is set and hop limit is
|
||||||
// set, start retransmissions
|
// not 0 or want_ack is set, start retransmissions
|
||||||
if (!isFromUs(p) && p->next_hop != NO_NEXT_HOP_PREFERENCE && (p->hop_limit > 0 || p->want_ack))
|
if ((!isFromUs(p) || !p->want_ack) && p->next_hop != NO_NEXT_HOP_PREFERENCE && (p->hop_limit > 0 || p->want_ack))
|
||||||
startRetransmission(packetPool.allocCopy(*p)); // start retransmission for relayed packet
|
startRetransmission(packetPool.allocCopy(*p)); // start retransmission for relayed packet
|
||||||
|
|
||||||
return Router::send(p);
|
return Router::send(p);
|
||||||
|
Loading…
Reference in New Issue
Block a user