From 66023cf52a08b25ec698a083129e1ff14b6101f3 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Thu, 21 Sep 2023 15:50:13 -0400 Subject: [PATCH] cleanup timed out connections --- spectator/http_client.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/spectator/http_client.cc b/spectator/http_client.cc index 6bda693..76c93e5 100644 --- a/spectator/http_client.cc +++ b/spectator/http_client.cc @@ -251,6 +251,7 @@ auto HttpClient::perform(const char* method, const std::string& url, if (elapsed < total_timeout && attempt_number < 2) { entry.set_attempt(attempt_number, false); entry.log(); + curl_easy_cleanup(&curl); return perform(method, url, std::move(headers), payload, size, attempt_number + 1); }