tool_operate: Fix retry sleep time shown to user when Retry-After

- 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
This commit is contained in:
Stian Soiland-Reyes 2019-10-16 14:35:56 +01:00 committed by Jay Satiro
parent e062043433
commit fe5c2464db

View 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);