mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 08:29:52 +00:00
fix sed issue - unable to reattach when the parent is removed (#326)
This commit is contained in:
@@ -957,6 +957,7 @@ void MeshForwarder::HandleSentFrame(Mac::Frame &aFrame)
|
||||
{
|
||||
Mac::Address macDest;
|
||||
Child *child;
|
||||
Neighbor *neighbor;
|
||||
|
||||
mSendBusy = false;
|
||||
|
||||
@@ -1004,6 +1005,17 @@ void MeshForwarder::HandleSentFrame(Mac::Frame &aFrame)
|
||||
}
|
||||
}
|
||||
|
||||
if (mSendMessage->GetType() == Message::kTypeMacDataPoll)
|
||||
{
|
||||
neighbor = mMle.GetParent();
|
||||
|
||||
if (neighbor->mState == Neighbor::kStateInvalid)
|
||||
{
|
||||
mPollTimer.Stop();
|
||||
mMle.BecomeDetached();
|
||||
}
|
||||
}
|
||||
|
||||
if (mSendMessage->GetDirectTransmission() == false && mSendMessage->IsChildPending() == false)
|
||||
{
|
||||
mSendQueue.Dequeue(*mSendMessage);
|
||||
|
||||
Reference in New Issue
Block a user