Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Originally, in the `HttpClient::perform()` method, a new `CurlHandle` was created upon every invocation, leading to subsequent calls to `curl_easy_init()` and `curl_easy_cleanup()`, as the variable went in and out of scope while it executed on the `asio::thread_pool`. This meant that there was no opportunity to reuse connections from the underlying connection pool, because it was always cleaned up. By marking the `CurlHandle` with the `thread_local` storage duration, it ensures that the same one remains in use for each thread, thus providing the means to reuse the established connection pool. Fixes Netflix-Skunkworks#51.
- Loading branch information