mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 08:37:47 +00:00
[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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user