[mle] reset last heard on receiving MLE Parent Request (#1991)

When a child is not attached, set the last heard and timeout values on
receiving an MLE Parent Request message.  This ensures that the child
state is not prematurely timed out when a child is trying to attach.
This commit is contained in:
Jonathan Hui
2017-07-13 13:49:27 -07:00
committed by GitHub
parent 11d668fb06
commit 12040b7275
+3
View File
@@ -1706,7 +1706,10 @@ otError MleRouter::HandleParentRequest(const Message &aMessage, const Ip6::Messa
child->ResetLinkFailures();
child->SetState(Neighbor::kStateParentRequest);
child->SetDataRequestPending(false);
}
if (!child->IsStateValidOrRestoring())
{
child->SetLastHeard(TimerMilli::GetNow());
child->SetTimeout(TimerMilli::MsecToSec(kMaxChildIdRequestTimeout));
}