From 0075364c89796595cbbb97daba0ed2bc1066d5b9 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 4 Jan 2024 01:02:51 +0000 Subject: [PATCH] Fix: curl_global_cleanup called before libcurl HTTP thread exited --- src/network/core/http_curl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/core/http_curl.cpp b/src/network/core/http_curl.cpp index ac49673341..c7a454da8b 100644 --- a/src/network/core/http_curl.cpp +++ b/src/network/core/http_curl.cpp @@ -276,8 +276,6 @@ void NetworkHTTPInitialize() void NetworkHTTPUninitialize() { - curl_global_cleanup(); - _http_thread_exit = true; /* Queues must be cleared (and the queue CV signalled) after _http_thread_exit is set to ensure that the HTTP thread can exit */ @@ -293,4 +291,6 @@ void NetworkHTTPUninitialize() if (_http_thread.joinable()) { _http_thread.join(); } + + curl_global_cleanup(); }