[svn] Made [0.5*wait, 1.5*wait) the range of --random-wait.

This commit is contained in:
hniksic 2006-02-05 00:35:22 -08:00
parent 85146a6ebd
commit a202418374
4 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2006-02-05 Hrvoje Niksic <hniksic@xemacs.org>
* wget.texi (Download Options): Document the modified meaning of
--random-wait.
2005-11-15 Hrvoje Niksic <hniksic@xemacs.org>
* wget.texi: Document https_proxy.

View File

@ -789,7 +789,9 @@ suffix, or in days using @code{d} suffix.
Specifying a large value for this option is useful if the network or the
destination host is down, so that Wget can wait long enough to
reasonably expect the network error to be fixed before the retry.
reasonably expect the network error to be fixed before the retry. The
waiting interval specified by this function is influenced by
@code{--random-wait}, which see.
@cindex retries, waiting between
@cindex waiting between retries
@ -811,7 +813,7 @@ Note that this option is turned on by default in the global
Some web sites may perform log analysis to identify retrieval programs
such as Wget by looking for statistically significant similarities in
the time between requests. This option causes the time between requests
to vary between 0 and 2 * @var{wait} seconds, where @var{wait} was
to vary between 0.5 and 1.5 * @var{wait} seconds, where @var{wait} was
specified using the @samp{--wait} option, in order to mask Wget's
presence from such analysis.

View File

@ -1,3 +1,8 @@
2006-02-05 Hrvoje Niksic <hniksic@xemacs.org>
* retr.c (sleep_between_retrievals): Sleep at a minimum of 1/2 of
the specified wait period.
2006-02-03 Hrvoje Niksic <hniksic@xemacs.org>
* utils.c (number_to_string): Don't use sprintf for printing

View File

@ -915,9 +915,9 @@ sleep_between_retrievals (int count)
else
{
/* Sleep a random amount of time averaging in opt.wait
seconds. The sleeping amount ranges from 0 to
opt.wait*2, inclusive. */
double waitsecs = 2 * opt.wait * random_float ();
seconds. The sleeping amount ranges from 0.5*opt.wait to
1.5*opt.wait. */
double waitsecs = (0.5 + random_float ()) * opt.wait;
DEBUGP (("sleep_between_retrievals: avg=%f,sleep=%f\n",
opt.wait, waitsecs));
xsleep (waitsecs);