Refactored background job shutdown logic

This commit is contained in:
sech1
2025-09-14 14:41:31 +02:00
parent 8c1c5fd8e1
commit 44f8d941a7
6 changed files with 46 additions and 24 deletions
+4
View File
@@ -97,6 +97,8 @@ CurlContext::CurlContext(const std::string& address, int port, const std::string
, m_connectedTime(0)
, m_proxy(proxy)
{
BACKGROUND_JOB_START(CurlContext);
m_pollHandles.reserve(2);
{
@@ -266,6 +268,8 @@ CurlContext::~CurlContext()
delete m_closeCallback;
curl_slist_free_all(m_headers);
BACKGROUND_JOB_STOP(CurlContext);
}
int CurlContext::on_socket(CURL* /*easy*/, curl_socket_t s, int action)