From 8acbaf719942a48fe300ad312f364d93a4f0c3b5 Mon Sep 17 00:00:00 2001 From: "ggtakec@gmail.com" Date: Mon, 18 Nov 2013 02:29:41 +0000 Subject: [PATCH] Fixed a bug. * Fixed a bug Fixes a bug that is dead loop when s3fs listed in a directory with directory objects which was not object(no information). This bug made by r493, and reported by issue 389. git-svn-id: http://s3fs.googlecode.com/svn/trunk@497 df820570-a93a-0410-bd06-b72b767a4274 --- src/curl.cpp | 4 +++- src/s3fs.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/curl.cpp b/src/curl.cpp index aa031e6..05e9165 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -3091,12 +3091,14 @@ int S3fsMultiCurl::MultiRead(void) // as possibly in multipart DPRN("failed a request(%ld: %s)", responseCode, s3fscurl->url.c_str()); isRetry = true; - }else{ + }else if(500 == responseCode){ // case of all other result, do retry.(11/13/2013) // because it was found that s3fs got 500 error from S3, but could success // to retry it. DPRN("failed a request(%ld: %s)", responseCode, s3fscurl->url.c_str()); isRetry = true; + }else{ + DPRN("failed a request(%ld: %s)", responseCode, s3fscurl->url.c_str()); } }else{ DPRN("failed a request(Unknown respons code: %s)", s3fscurl->url.c_str()); diff --git a/src/s3fs.cpp b/src/s3fs.cpp index cf43988..a55ec6e 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -2090,7 +2090,7 @@ static S3fsCurl* multi_head_retry_callback(S3fsCurl* s3fscurl) delete newcurl; return NULL; } - newcurl->SetMultipartRetryCount(s3fscurl->GetMultipartRetryCount()); + newcurl->SetMultipartRetryCount(s3fscurl->GetMultipartRetryCount() + 1); return newcurl; }