[svn] Don't ignore timeout when progress=dot.

This commit is contained in:
hniksic 2005-04-16 13:12:43 -07:00
parent 4de69525f2
commit 9756b0adf5
2 changed files with 11 additions and 4 deletions

View 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

View 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)
{