diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-12-18 23:00:35 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-12-18 23:00:35 +0900 |
| commit | 029d6897f2b0d7d2f2bad904dd145cc33f6d35cf (patch) | |
| tree | 0f50c15901f31f00091c196fd77169a5cafe30fd /src | |
| parent | c54ecdf8e19f6b5699c59fad752735569012742e (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/HttpSkipResponseCommand.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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. |
