Also when want_ack is set, we should try to retransmit

This commit is contained in:
GUVWAF
2024-11-08 21:42:54 +01:00
parent 78bf1e192b
commit f37abe8f0f
2 changed files with 6 additions and 6 deletions

View File

@@ -20,9 +20,9 @@ ErrorCode NextHopRouter::send(meshtastic_MeshPacket *p)
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);
// If it's from us, ReliableRouter already handles retransmissions. If a next hop is set and hop limit is not 0, start
// retransmissions
if (!isFromUs(p) && p->next_hop != NO_NEXT_HOP_PREFERENCE && p->hop_limit > 0)
// 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
// set, start retransmissions
if (!isFromUs(p) && p->next_hop != NO_NEXT_HOP_PREFERENCE && (p->hop_limit > 0 || p->want_ack))
startRetransmission(packetPool.allocCopy(*p)); // start retransmission for relayed packet
return Router::send(p);