diff --git a/spectator/http_client.cc b/spectator/http_client.cc index 6bda693..f96f805 100644 --- a/spectator/http_client.cc +++ b/spectator/http_client.cc @@ -199,7 +199,7 @@ auto HttpClient::perform(const char* method, const std::string& url, int attempt_number) const -> HttpResponse { LogEntry entry{registry_, method, url}; - CurlHandle curl; + static CurlHandle curl; auto total_timeout = config_.connect_timeout + config_.read_timeout; curl.set_timeout(total_timeout); curl.set_connect_timeout(config_.connect_timeout);