Browse Source

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.
Tatsuhiro Tsujikawa 9 years ago
parent
commit
029d6897f2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/HttpSkipResponseCommand.cc

+ 2 - 1
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.