mirror of
https://github.com/espressif/openthread.git
synced 2026-07-28 22:57:47 +00:00
[netdata] ensure to free context ID once (#8860)
This commit updates `NetworkData::Leader::HandleTimer()` such that once the reuse delay time for a previously used Context ID is reached and the ID is freed, the `mContextLastUsed` is also set to zero. This ensures that context ID is freed only once from `HandleTimer ()` calls (which avoids incrementing the version again).
This commit is contained in:
@@ -1336,6 +1336,7 @@ void Leader::HandleTimer(void)
|
||||
|
||||
if (TimerMilli::GetNow() - mContextLastUsed[i] >= Time::SecToMsec(mContextIdReuseDelay))
|
||||
{
|
||||
mContextLastUsed[i].SetValue(0);
|
||||
FreeContextId(kMinContextId + i);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user