mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 09:18:55 +00:00
Merge pull request #739 from orozery/cleanup_failing_curl_handles
cleanup curl handle state on retries
This commit is contained in:
commit
1a23b880d5
@ -1762,7 +1762,9 @@ bool S3fsCurl::DestroyCurlHandle(void)
|
|||||||
|
|
||||||
S3fsCurl::curl_times.erase(hCurl);
|
S3fsCurl::curl_times.erase(hCurl);
|
||||||
S3fsCurl::curl_progress.erase(hCurl);
|
S3fsCurl::curl_progress.erase(hCurl);
|
||||||
|
if(retry_count == 0){
|
||||||
sCurlPool->ReturnHandler(hCurl);
|
sCurlPool->ReturnHandler(hCurl);
|
||||||
|
}
|
||||||
hCurl = NULL;
|
hCurl = NULL;
|
||||||
ClearInternalData();
|
ClearInternalData();
|
||||||
|
|
||||||
@ -1872,7 +1874,12 @@ bool S3fsCurl::RemakeHandle(void)
|
|||||||
partdata.size = b_partdata_size;
|
partdata.size = b_partdata_size;
|
||||||
|
|
||||||
// reset handle
|
// reset handle
|
||||||
|
curl_easy_cleanup(hCurl);
|
||||||
|
hCurl = curl_easy_init();
|
||||||
ResetHandle();
|
ResetHandle();
|
||||||
|
// disable ssl cache, so that a new session will be created
|
||||||
|
curl_easy_setopt(hCurl, CURLOPT_SSL_SESSIONID_CACHE, 0);
|
||||||
|
curl_easy_setopt(hCurl, CURLOPT_SHARE, NULL);
|
||||||
|
|
||||||
// set options
|
// set options
|
||||||
switch(type){
|
switch(type){
|
||||||
|
Loading…
Reference in New Issue
Block a user