+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
}
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)
{