mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-06-01 00:20:49 +00:00
configurable retries... -oretries=3
git-svn-id: http://s3fs.googlecode.com/svn/trunk@82 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
52d6be7e20
commit
04534c156f
|
@ -174,13 +174,16 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// -oretries=3
|
||||||
|
static int retries = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return fuse return code
|
* @return fuse return code
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
my_curl_easy_perform(CURL* curl) {
|
my_curl_easy_perform(CURL* curl) {
|
||||||
int retries = 3;
|
int t = retries;
|
||||||
while (retries-- > 0) {
|
while (t-- > 0) {
|
||||||
CURLcode curlCode = curl_easy_perform(curl);
|
CURLcode curlCode = curl_easy_perform(curl);
|
||||||
if (curlCode == 0)
|
if (curlCode == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1083,6 +1086,10 @@ my_fuse_opt_proc(void *data, const char *arg, int key, struct fuse_args *outargs
|
||||||
AWSSecretAccessKey = strchr(arg, '=') + 1;
|
AWSSecretAccessKey = strchr(arg, '=') + 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (strstr(arg, "retries=") != 0) {
|
||||||
|
retries = atoi(strchr(arg, '=') + 1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (strstr(arg, "use_cache=") != 0) {
|
if (strstr(arg, "use_cache=") != 0) {
|
||||||
use_cache = strchr(arg, '=') + 1;
|
use_cache = strchr(arg, '=') + 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user