BaseChatMesh: test an ACK's route before marking it do-not-retransmit
onAckRecv called markDoNotRetransmit(), which sets the header to 0xFF, before testing isRouteFlood(). 0xFF's route bits read as ROUTE_TYPE_TRANSPORT_DIRECT, so the test was always false and handleReturnPathRetry never ran for a flood ACK: the reciprocal path was never re-sent to a node that was still flooding. Mark the packet after the test instead.
This commit is contained in:
1 parent
0d72bcd44c
commit
713802a714
1 file changed
+2
-1
@@ -380,12 +380,13 @@ void BaseChatMesh::onAckRecv(mesh::Packet* packet, uint32_t ack_crc) {
|
||||
ContactInfo* from;
|
||||
if ((from = processAck((uint8_t *)&ack_crc)) != NULL) {
|
||||
txt_send_timeout = 0; // matched one we're waiting for, cancel timeout timer
|
||||
packet->markDoNotRetransmit(); // ACK was for this node, so don't retransmit
|
||||
|
||||
if (packet->isRouteFlood() && from->out_path_len != OUT_PATH_UNKNOWN) {
|
||||
// we have direct path, but other node is still sending flood, so maybe they didn't receive reciprocal path properly(?)
|
||||
handleReturnPathRetry(*from, packet->path, packet->path_len);
|
||||
}
|
||||
// NOTE: must come after the isRouteFlood() test, as it overwrites the header
|
||||
packet->markDoNotRetransmit(); // ACK was for this node, so don't retransmit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user