From 32358df13e1169595f10931cdb48faa2ce2b592f Mon Sep 17 00:00:00 2001 From: rmg-x Date: Sat, 30 Nov 2024 17:05:50 -0600 Subject: [PATCH] RequestServer: Remove unused global "g_dns_cache" `curl_slist_append` copies the string so we don't need to keep it around ourselves. --- Services/RequestServer/ConnectionFromClient.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Services/RequestServer/ConnectionFromClient.cpp b/Services/RequestServer/ConnectionFromClient.cpp index dc94816e584..59fc0eaaf30 100644 --- a/Services/RequestServer/ConnectionFromClient.cpp +++ b/Services/RequestServer/ConnectionFromClient.cpp @@ -26,7 +26,6 @@ ByteString g_default_certificate_path; static HashMap> s_connections; static IDAllocator s_client_ids; static long s_connect_timeout_seconds = 90L; -static HashMap g_dns_cache; // host -> curl "resolve" string static struct { Optional server_address; Optional server_hostname; @@ -447,7 +446,6 @@ void ConnectionFromClient::start_request(i32 request_id, ByteString const& metho } auto formatted_address = resolve_opt_builder.to_byte_string(); - g_dns_cache.set(host, formatted_address); curl_slist* resolve_list = curl_slist_append(nullptr, formatted_address.characters()); curl_easy_setopt(easy, CURLOPT_RESOLVE, resolve_list);