mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +00:00
Merge pull request #952 from gaul/multipart/failed
Automatically abort failed multipart requests
This commit is contained in:
commit
bd66b57ad3
16
src/curl.cpp
16
src/curl.cpp
@ -1429,6 +1429,14 @@ int S3fsCurl::ParallelMultipartUploadRequest(const char* tpath, headers_t& meta,
|
||||
// Multi request
|
||||
if(0 != (result = curlmulti.Request())){
|
||||
S3FS_PRN_ERR("error occurred in multi request(errno=%d).", result);
|
||||
|
||||
S3fsCurl s3fscurl_abort(true);
|
||||
int result2 = s3fscurl_abort.AbortMultipartUpload(tpath, upload_id);
|
||||
s3fscurl_abort.DestroyCurlHandle();
|
||||
if(result2 != 0){
|
||||
S3FS_PRN_ERR("error aborting multipart upload(errno=%d).", result2);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -3923,6 +3931,14 @@ int S3fsCurl::MultipartRenameRequest(const char* from, const char* to, headers_t
|
||||
// Multi request
|
||||
if(0 != (result = curlmulti.Request())){
|
||||
S3FS_PRN_ERR("error occurred in multi request(errno=%d).", result);
|
||||
|
||||
S3fsCurl s3fscurl_abort(true);
|
||||
int result2 = s3fscurl_abort.AbortMultipartUpload(to, upload_id);
|
||||
s3fscurl_abort.DestroyCurlHandle();
|
||||
if(result2 != 0){
|
||||
S3FS_PRN_ERR("error aborting multipart upload(errno=%d).", result2);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user