[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:
Abtin Keshavarzian
2023-04-20 17:40:48 -07:00
committed by GitHub
parent 6955fde6ae
commit 658179fa93
+1 -1
View File
@@ -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));