]> sjero.net Git - wget/commitdiff
[svn] Don't ignore timeout when progress=dot.
authorhniksic <devnull@localhost>
Sat, 16 Apr 2005 20:12:43 +0000 (13:12 -0700)
committerhniksic <devnull@localhost>
Sat, 16 Apr 2005 20:12:43 +0000 (13:12 -0700)
src/ChangeLog
src/retr.c

index b1f5e9ce7b891ce3d047d8c0722dfd89ce3e4b05..f51928c36151856e0705627e620ae9ce1127b952 100644 (file)
@@ -1,3 +1,10 @@
+2005-04-16  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * retr.c (fd_read_body): Respect read timeout with non-interactive
+       or no progress gauge -- treat ETIMEDOUT specially only when
+       progress_interactive.
+       Reported by FUJISHIMA Satsuki.
+
 2005-04-16  FUJISHIMA Satsuki  <sf@FreeBSD.org>
 
        * http.c (gethttp): Don't use HTTP/1.0 persistent connections over
index 842eaaae116d88c9a70d73fc67740464bb2e4e9b..64f396ea7e7e1161dadb259ea3c5719c93a4be5f 100644 (file)
@@ -281,10 +281,10 @@ fd_read_body (int fd, FILE *out, wgint toread, wgint startpos,
        }
       ret = fd_read (fd, dlbuf, rdsize, tmout);
 
-      if (ret == 0 || (ret < 0 && errno != ETIMEDOUT))
-       break;                  /* read error */
-      else if (ret < 0)
-       ret = 0;                /* read timeout */
+      if (progress_interactive && ret < 0 && errno == ETIMEDOUT)
+       ret = 0;                /* interactive timeout, handled above */
+      else if (ret <= 0)
+       break;                  /* EOF or read error */
 
       if (progress || opt.limit_rate)
        {