Ensure fetch attempts is not reduced to less than 1.
This commit is contained in:
parent
6b57c94012
commit
d39531ff55
|
@ -192,8 +192,9 @@ static void nsoption_validate(struct nsoption_s *opts, struct nsoption_s *defs)
|
|||
opts[NSOPTION_curl_fetch_timeout].value.u = 5;
|
||||
if (opts[NSOPTION_curl_fetch_timeout].value.u > 60)
|
||||
opts[NSOPTION_curl_fetch_timeout].value.u = 60;
|
||||
while ((opts[NSOPTION_curl_fetch_timeout].value.u *
|
||||
opts[NSOPTION_max_retried_fetches].value.u) > 60)
|
||||
while (((opts[NSOPTION_curl_fetch_timeout].value.u *
|
||||
opts[NSOPTION_max_retried_fetches].value.u) > 60) &&
|
||||
(opts[NSOPTION_max_retried_fetches].value.u > 1))
|
||||
opts[NSOPTION_max_retried_fetches].value.u--;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue