mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 06:07:48 +00:00
[indirect-sender] free and dequeue the supervision message when removed (#6213)
This commit fixes an issue with removal of supervision message for child when another message is queued for the same child. This fixes an issue added by PR#5638 (which itself addresses an issue that if the supervision message was removed while MAC was busy sending the message, the MAC layer would not be notified of the removal).
This commit is contained in:
@@ -109,6 +109,8 @@ void IndirectSender::AddMessageForSleepyChild(Message &aMessage, Child &aChild)
|
||||
if (supervisionMessage != nullptr)
|
||||
{
|
||||
IgnoreError(RemoveMessageFromSleepyChild(*supervisionMessage, aChild));
|
||||
Get<MeshForwarder>().mSendQueue.Dequeue(*supervisionMessage);
|
||||
supervisionMessage->Free();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user