Fixed a deadlock bug when specifying iam role(IAMv2)

This commit is contained in:
Takeshi Nakatani 2023-01-29 09:25:51 +00:00 committed by Andrew Gaul
parent 7605c2e8fb
commit 38e8a830c9

View File

@ -2885,6 +2885,9 @@ int S3fsCurl::GetIAMv2ApiToken(const char* token_url, int token_ttl, const char*
if(CURLE_OK != curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback)){ if(CURLE_OK != curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback)){
return -EIO; return -EIO;
} }
if(CURLE_OK != curl_easy_setopt(hCurl, CURLOPT_INFILESIZE, 0)){
return false;
}
if(!S3fsCurl::AddUserAgent(hCurl)){ // put User-Agent if(!S3fsCurl::AddUserAgent(hCurl)){ // put User-Agent
return -EIO; return -EIO;
} }