From 029d6897f2b0d7d2f2bad904dd145cc33f6d35cf Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 18 Dec 2015 23:00:35 +0900 Subject: Apply --retry-wait when retrying after 404 Previously, --retry-wait was not used when retrying after 404 (--max-file-not-found). The retry was done without delay. Also the maximum retry count (--max-retries) was ignored when retrying with 404. This commit makes --retry-wait apply for retrying with 404 as well. It also combines --max-retries and --max-file-not-found. When retrying with 404, it is counted toward retry count. --- src/HttpSkipResponseCommand.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/HttpSkipResponseCommand.cc') diff --git a/src/HttpSkipResponseCommand.cc b/src/HttpSkipResponseCommand.cc index c3c573cc..e968ff36 100644 --- a/src/HttpSkipResponseCommand.cc +++ b/src/HttpSkipResponseCommand.cc @@ -215,7 +215,8 @@ bool HttpSkipResponseCommand::processResponse() throw DL_ABORT_EX2(MSG_RESOURCE_NOT_FOUND, error_code::RESOURCE_NOT_FOUND); } - return prepareForRetry(0); + throw DL_RETRY_EX2(MSG_RESOURCE_NOT_FOUND, + error_code::RESOURCE_NOT_FOUND); } else if(statusCode == 503) { // Only retry if pretry-wait > 0. Hammering 'busy' server is not // a good idea. -- cgit