diff --git a/Userland/Services/RequestServer/ConnectionCache.h b/Userland/Services/RequestServer/ConnectionCache.h index ecb5389c5c9..f9dd0317e1f 100644 --- a/Userland/Services/RequestServer/ConnectionCache.h +++ b/Userland/Services/RequestServer/ConnectionCache.h @@ -100,8 +100,7 @@ struct JobData { } #endif - template - static JobData create(WeakPtr job, [[maybe_unused]] URL::URL url) + static JobData create(auto job, [[maybe_unused]] URL::URL url) { return JobData { [job](auto& socket) { job->start(socket); }, diff --git a/Userland/Services/RequestServer/ConnectionFromClient.cpp b/Userland/Services/RequestServer/ConnectionFromClient.cpp index bc562b24c16..33b3563d8e6 100644 --- a/Userland/Services/RequestServer/ConnectionFromClient.cpp +++ b/Userland/Services/RequestServer/ConnectionFromClient.cpp @@ -162,7 +162,7 @@ void ConnectionFromClient::worker_do_work(Work work) dbgln("EnsureConnection: Pre-connect to {}", url); auto do_preconnect = [=, job = Job::ensure(url)](auto& cache) { - ConnectionCache::ensure_connection(cache, url, job->make_weak_ptr()); + ConnectionCache::ensure_connection(cache, url, move(job)); }; if (url.scheme() == "http"sv)