mirror of
https://github.com/espressif/openthread.git
synced 2026-07-28 14:47:46 +00:00
[mesh-forwarder] use RemoveMessageIfNoPendingTx() on direct tx fails (#10471)
This commit updates `PrepareNextDirectTransmission()` to use `RemoveMessageIfNoPendingTx()` if a message cannot be prepared for direct transmission. This ensures the message is not dequeued and freed if it is also queued for indirect transmission.
This commit is contained in:
@@ -654,7 +654,7 @@ Message *MeshForwarder::PrepareNextDirectTransmission(void)
|
||||
#endif
|
||||
LogMessage(kMessageDrop, *curMessage, error);
|
||||
FinalizeMessageDirectTx(*curMessage, error);
|
||||
mSendQueue.DequeueAndFree(*curMessage);
|
||||
RemoveMessageIfNoPendingTx(*curMessage);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user