[mle] enable state update timer when enabling router role (#4094)

The state update timer should be started when enabling router role and
attached to a network.
This commit is contained in:
Jeffrey Hayes
2019-08-14 12:34:51 -07:00
committed by Jonathan Hui
parent d0214bffe6
commit c6d7674b2c
+5
View File
@@ -125,6 +125,11 @@ void MleRouter::SetRouterRoleEnabled(bool aEnabled)
break;
}
if (IsRouterRoleEnabled() && IsAttached() && !mStateUpdateTimer.IsRunning())
{
mStateUpdateTimer.Start(kStateUpdatePeriod);
}
}
otError MleRouter::BecomeRouter(ThreadStatusTlv::Status aStatus)