fix(curl_thread_pool): clean up clients_in_proc in destroy()
destroy() aborted and deleted clients in the queue but did not delete clients that were currently being processed (clients_in_proc). If a thread was terminated while processing a client, that client object and its CURL handle were leaked.
This commit is contained in:
@@ -92,5 +92,10 @@ void CurlThreadPool::destroy() {
|
||||
for (auto c: *cr)
|
||||
delete c;
|
||||
}
|
||||
{
|
||||
auto cr = clients_in_proc.getRef();
|
||||
for (auto c: *cr)
|
||||
delete c;
|
||||
}
|
||||
// piCout << "~CurlThreadPool ok";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user