summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Services/LookupServer/LookupServer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Services/LookupServer/LookupServer.cpp b/Userland/Services/LookupServer/LookupServer.cpp
index 17dfc2ed45..522fe94050 100644
--- a/Userland/Services/LookupServer/LookupServer.cpp
+++ b/Userland/Services/LookupServer/LookupServer.cpp
@@ -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)