]> sjero.net Git - wget/blobdiff - src/ftp.c
[svn] Applied contributed patches (see ChangeLog for details.)
[wget] / src / ftp.c
index 9077c674c4b243477754e304553698711a20e3dd..e5a2925e4466bb9b6e483b07dfd8010260a8d129 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -852,9 +852,16 @@ ftp_loop_internal (struct urlinfo *u, struct fileinfo *f, ccon *con)
       /* Increment the pass counter.  */
       ++count;
       /* Wait before the retrieval (unless this is the very first
-        retrieval).  */
-      if (!first_retrieval && opt.wait)
-       sleep (opt.wait);
+        retrieval).
+        Check if we are retrying or not, wait accordingly - HEH */
+      if (!first_retrieval && (opt.wait || (count && opt.waitretry)))
+       if (count)
+         if (count<opt.waitretry)
+           sleep(count);
+         else
+           sleep(opt.waitretry);
+       else
+         sleep (opt.wait);
       if (first_retrieval)
        first_retrieval = 0;
       if (con->st & ON_YOUR_OWN)