mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 02:32:44 +03:00
Fix constraints on curl_fetch_timeout option.
5 <= n <= 60 seconds.
This commit is contained in:
parent
3b57ce1013
commit
c207216fa2
@ -189,9 +189,9 @@ static void nsoption_validate(struct nsoption_s *opts, struct nsoption_s *defs)
|
||||
if (opts[NSOPTION_max_retried_fetches].value.u == 0)
|
||||
opts[NSOPTION_max_retried_fetches].value.u = 1;
|
||||
if (opts[NSOPTION_curl_fetch_timeout].value.u < 5)
|
||||
opts[NSOPTION_max_retried_fetches].value.u = 5;
|
||||
opts[NSOPTION_curl_fetch_timeout].value.u = 5;
|
||||
if (opts[NSOPTION_curl_fetch_timeout].value.u > 60)
|
||||
opts[NSOPTION_max_retried_fetches].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)
|
||||
opts[NSOPTION_max_retried_fetches].value.u--;
|
||||
|
Loading…
Reference in New Issue
Block a user