]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: Fix retry sleep time shown to user when Retry-After
authorStian Soiland-Reyes <stain@apache.org>
Wed, 16 Oct 2019 13:35:56 +0000 (14:35 +0100)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 16 Oct 2019 17:56:38 +0000 (13:56 -0400)
- If server header Retry-After is being used for retry sleep time then
  show that value to the user instead of the normal retry sleep time.

This is a follow-up to 640b973 (7.66.0) which changed curl tool so that
the value from Retry-After header overrides other retry timing options.

Closes https://github.com/curl/curl/pull/4498

src/tool_operate.c

index b82a6672d4d06dd677dfe210fea79a91f60e7509..3087d2d14ef1b61e343fad56f7b3ecf537ad99ee 100644 (file)
@@ -529,7 +529,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
       warnf(config->global, "Transient problem: %s "
             "Will retry in %ld seconds. "
             "%ld retries left.\n",
-            m[retry], per->retry_sleep/1000L, per->retry_numretries);
+            m[retry], sleeptime/1000L, per->retry_numretries);
 
       per->retry_numretries--;
       tool_go_sleep(sleeptime);