Formatting and correct NUM_RETRANSMISSIONS

This commit is contained in:
GUVWAF
2024-11-11 13:01:02 +01:00
parent 3725319b4b
commit 42d17b3322
5 changed files with 22 additions and 19 deletions

View File

@@ -122,6 +122,7 @@ PendingPacket *NextHopRouter::findPendingPacket(GlobalPacketId key)
} else
return NULL;
}
/**
* Stop any retransmissions we are doing of the specified node/packet ID pair
*/
@@ -138,7 +139,7 @@ bool NextHopRouter::stopRetransmission(GlobalPacketId key)
auto p = old->packet;
/* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue
to avoid canceling a transmission if it was ACKed super fast via MQTT */
if (old->numRetransmissions < NUM_RETRANSMISSIONS - 1) {
if (old->numRetransmissions < NUM_RELIABLE_RETX - 1) {
// remove the 'original' (identified by originator and packet->id) from the txqueue and free it
cancelSending(getFrom(p), p->id);
// now free the pooled copy for retransmission too