mirror of
https://github.com/espressif/openthread.git
synced 2026-09-09 10:40:09 +00:00
[mle-router] stop mStateUpdateTimer on mode change (#3376)
This commit ensures to not re-start the `mStateUpdateTimer` from its callback, when router role is disabled. This addresses the issue where a mode change (disabling router role) could cause the timer to continue to fire indefinitely, further causing device to attempt to reattach from each timer callback. Thanks to Conor O'Neill (@conormoneill) for discovering and debugging this issue.
This commit is contained in:
committed by
Jonathan Hui
parent
4279dbc14c
commit
200b3dabcf
@@ -1690,6 +1690,8 @@ void MleRouter::HandleStateUpdateTimer(void)
|
||||
{
|
||||
bool routerStateUpdate = false;
|
||||
|
||||
VerifyOrExit(IsRouterRoleEnabled());
|
||||
|
||||
mStateUpdateTimer.Start(kStateUpdatePeriod);
|
||||
|
||||
if (mChallengeTimeout > 0)
|
||||
|
||||
Reference in New Issue
Block a user