mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 22:22:05 +00:00
Don't cancel sending ReTx for relayer if we're ROUTER(_LATE)/REPEATER (#6904)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
parent
158c88ddef
commit
8908805894
@ -165,10 +165,15 @@ bool NextHopRouter::stopRetransmission(GlobalPacketId key)
|
|||||||
/* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue
|
/* 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 */
|
to avoid canceling a transmission if it was ACKed super fast via MQTT */
|
||||||
if (old->numRetransmissions < NUM_RELIABLE_RETX - 1) {
|
if (old->numRetransmissions < NUM_RELIABLE_RETX - 1) {
|
||||||
// remove the 'original' (identified by originator and packet->id) from the txqueue and free it
|
// We only cancel it if we are the original sender or if we're not a router(_late)/repeater
|
||||||
cancelSending(getFrom(p), p->id);
|
if (isFromUs(p) || (config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER &&
|
||||||
// now free the pooled copy for retransmission too
|
config.device.role != meshtastic_Config_DeviceConfig_Role_REPEATER &&
|
||||||
packetPool.release(p);
|
config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)) {
|
||||||
|
// 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
|
||||||
|
packetPool.release(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
auto numErased = pending.erase(key);
|
auto numErased = pending.erase(key);
|
||||||
assert(numErased == 1);
|
assert(numErased == 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user