mirror of
https://github.com/espressif/openthread.git
synced 2026-08-25 03:39:52 +00:00
[network-data] fix to ensure resubmit delay (#4644)
Fix bug introduced in 5ebc583 when changing from VerifyOrExit to if.
This commit is contained in:
@@ -981,11 +981,9 @@ otError NetworkData::SendServerDataNotification(uint16_t aRloc16)
|
||||
{
|
||||
uint32_t diff = TimerMilli::GetNow() - mLastAttempt;
|
||||
|
||||
if (((mType == kTypeLocal) && (diff > kDataResubmitDelay)) ||
|
||||
((mType == kTypeLeader) && (diff > kProxyResubmitDelay)))
|
||||
{
|
||||
ExitNow(error = OT_ERROR_ALREADY);
|
||||
}
|
||||
VerifyOrExit(((mType == kTypeLocal) && (diff > kDataResubmitDelay)) ||
|
||||
((mType == kTypeLeader) && (diff > kProxyResubmitDelay)),
|
||||
error = OT_ERROR_ALREADY);
|
||||
}
|
||||
|
||||
VerifyOrExit((message = Get<Coap::Coap>().NewMessage()) != NULL, error = OT_ERROR_NO_BUFS);
|
||||
|
||||
Reference in New Issue
Block a user