diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/curl_wrapper.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp index ef724b9..068f0ea 100644 --- a/src/curl_wrapper.cpp +++ b/src/curl_wrapper.cpp @@ -20,28 +20,17 @@ namespace mastodonpp { -bool curl_initialized{false}; - CURLWrapper::CURLWrapper() : _curl_buffer_error{} { - if (!curl_initialized) - { - curl_global_init(CURL_GLOBAL_ALL); // NOLINT(hicpp-signed-bitwise) - curl_initialized = true; - } + curl_global_init(CURL_GLOBAL_ALL); // NOLINT(hicpp-signed-bitwise) _connection = curl_easy_init(); setup_curl(); } CURLWrapper::~CURLWrapper() noexcept { curl_easy_cleanup(_connection); - - if (curl_initialized) - { - curl_global_cleanup(); - curl_initialized = false; - } + curl_global_cleanup(); } int CURLWrapper::writer(char *data, size_t size, size_t nmemb, string *writerData) |