diff --git a/Userland/Services/RequestServer/HttpCommon.h b/Userland/Services/RequestServer/HttpCommon.h index 15b7b85d14..77bed46dea 100644 --- a/Userland/Services/RequestServer/HttpCommon.h +++ b/Userland/Services/RequestServer/HttpCommon.h @@ -102,12 +102,10 @@ OwnPtr start_request(TBadgedProtocol&& protocol, i32 request_id, Connec auto protocol_request = TRequest::create_with_job(forward(protocol), client, (TJob&)*job, move(output_stream), request_id); protocol_request->set_request_fd(pipe_result.value().read_fd); - Core::EventLoop::current().deferred_invoke([=] { - if constexpr (IsSame) - ConnectionCache::get_or_create_connection(ConnectionCache::g_tls_connection_cache, url, job, proxy_data); - else - ConnectionCache::get_or_create_connection(ConnectionCache::g_tcp_connection_cache, url, job, proxy_data); - }); + if constexpr (IsSame) + ConnectionCache::get_or_create_connection(ConnectionCache::g_tls_connection_cache, url, job, proxy_data); + else + ConnectionCache::get_or_create_connection(ConnectionCache::g_tcp_connection_cache, url, job, proxy_data); return protocol_request; }