mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 05:37:46 +00:00
[child-supervision] relax the check for starting the supervision timeout timer (#2446)
This commit changes the `SupervisionListener` implementation by relaxing the checks for when to start the supervision listener timeout timer, in particular relaxing the check for role to be `ROLE_CHILD`. This addresses an issue where timer may not start during (re-)attach process after a "Child Id Request" transmission where the device becomes sleepy but it's not yet fully attached as a child.
This commit is contained in:
committed by
Jonathan Hui
parent
eeb24229f0
commit
c26f5e3bbe
@@ -214,9 +214,7 @@ void SupervisionListener::RestartTimer(void)
|
||||
{
|
||||
ThreadNetif &netif = GetNetif();
|
||||
|
||||
// Restart the timer, if the timeout value is non-zero and the device is a sleepy child.
|
||||
|
||||
if ((mTimeout != 0) && (netif.GetMle().GetRole() == OT_DEVICE_ROLE_CHILD) &&
|
||||
if ((mTimeout != 0) && (netif.GetMle().GetRole() != OT_DEVICE_ROLE_DISABLED) &&
|
||||
(netif.GetMeshForwarder().GetRxOnWhenIdle() == false))
|
||||
{
|
||||
mTimer.Start(TimerMilli::SecToMsec(mTimeout));
|
||||
|
||||
Reference in New Issue
Block a user