tool: simplify retrycheck()

- By making retry_sleep() a separate funtion that determines how long to
  wait until the next retry.

- switch the retry timer to uint32 to make it uniform across platforms

Closes #21279
This commit is contained in:
Daniel Stenberg 2026-04-09 17:41:27 +02:00
parent 008aa2b38f
commit bb3670f929
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 105 additions and 86 deletions

View file

@ -2429,7 +2429,9 @@ static ParameterError opt_secs(struct OperationConfig *config,
config->connecttimeout_ms = val;
break;
case C_RETRY_DELAY: /* --retry-delay */
config->retry_delay_ms = val;
if(val >= INT32_MAX)
val = INT32_MAX;
config->retry_delay_ms = (uint32_t)val;
break;
case C_RETRY_MAX_TIME: /* --retry-max-time */
config->retry_maxtime_ms = val;