mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LookupServer: Put upstream DNS responses in cache
This commit is contained in:
parent
c7409af627
commit
7375beced3
1 changed files with 3 additions and 1 deletions
|
@ -204,8 +204,10 @@ ErrorOr<Vector<Answer>> LookupServer::lookup(Name const& name, RecordType record
|
|||
break;
|
||||
} while (--retries);
|
||||
if (!upstream_answers.is_empty()) {
|
||||
for (auto& answer : upstream_answers)
|
||||
for (auto& answer : upstream_answers) {
|
||||
add_answer(answer);
|
||||
put_in_cache(answer);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
if (!did_get_response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue