mirror of
https://github.com/espressif/openthread.git
synced 2026-08-21 01:49:52 +00:00
[dns-client] fix finalizing query from HandleTimer() (#8982)
This commit fixes an issue in `HandleTimer()` where we need to use `break` instead of `continue` after calling `FinalizeQuery()`. Note that we now have two loops, an outer loop on `mMainQueries` and then an inner loop on queries associated with a `mainQuery`. When we finalize a query, its related `mainQuery` (along with all its sub-queries) are finalized and removed.
This commit is contained in:
@@ -1450,7 +1450,7 @@ void Client::HandleTimer(void)
|
||||
if (info.mTransmissionCount >= info.mConfig.GetMaxTxAttempts())
|
||||
{
|
||||
FinalizeQuery(*query, kErrorResponseTimeout);
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
IgnoreError(SendQuery(*query, info, /* aUpdateTimer */ false));
|
||||
|
||||
Reference in New Issue
Block a user