Skip to content

Commit e9d0d24

Browse files
authored
only call curl_global_cleanup once (#2890)
1 parent f53fba1 commit e9d0d24

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,11 @@ void CurlHttpClient::InitGlobalState()
530530

531531
void CurlHttpClient::CleanupGlobalState()
532532
{
533-
curl_global_cleanup();
534-
isInit = false;
533+
if (isInit)
534+
{
535+
curl_global_cleanup();
536+
isInit = false;
537+
}
535538
}
536539

537540
Aws::String CurlInfoTypeToString(curl_infotype type)

0 commit comments

Comments
 (0)