]> sjero.net Git - wget/commitdiff
[svn] Made [0.5*wait, 1.5*wait) the range of --random-wait.
authorhniksic <devnull@localhost>
Sun, 5 Feb 2006 08:35:22 +0000 (00:35 -0800)
committerhniksic <devnull@localhost>
Sun, 5 Feb 2006 08:35:22 +0000 (00:35 -0800)
doc/ChangeLog
doc/wget.texi
src/ChangeLog
src/retr.c

index bb68fdc87403f6f6f70ba687e8aa4081ea1a2e7d..ba6029723c739e1bb54af94997cfa2407ad1ec40 100644 (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.
index baa76c125f7faf4871f5ac9c3c19552221defdaa..af63839fa952ebb355ae957a01ec96ae172c89b4 100644 (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.
 
index dbe41e328645ca69821f0ff7d54d2a5a06cf1979..14d91354ec819531967bf020fbfea7dc8aa56074 100644 (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
index 1df7f3bfe58a58a094c3ba350f7e1ef736bc9428..14f4ffabecfb15906349ddef9c96601d74b6b409 100644 (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);