mirror of
https://github.com/mirror/wget.git
synced 2025-02-24 10:41:01 +08:00
[svn] Don't fiddle with "interactive timeout" if read timeout is unset.
This commit is contained in:
parent
78890a267c
commit
9179f2e699
@ -1,3 +1,8 @@
|
|||||||
|
2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* retr.c (fd_read_body): Don't fiddle with "interactive timeout"
|
||||||
|
if read timeout is unset.
|
||||||
|
|
||||||
2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
|
* connect.c (bind_local): Don't set the IPV6_V6ONLY option on the
|
||||||
|
@ -259,11 +259,13 @@ fd_read_body (int fd, FILE *out, long toread, long startpos,
|
|||||||
double tmout = opt.read_timeout;
|
double tmout = opt.read_timeout;
|
||||||
if (progress_interactive)
|
if (progress_interactive)
|
||||||
{
|
{
|
||||||
double waittm;
|
|
||||||
/* For interactive progress gauges, always specify a ~1s
|
/* For interactive progress gauges, always specify a ~1s
|
||||||
timeout, so that the gauge can be updated regularly even
|
timeout, so that the gauge can be updated regularly even
|
||||||
when the data arrives very slowly or stalls. */
|
when the data arrives very slowly or stalls. */
|
||||||
tmout = 0.95;
|
tmout = 0.95;
|
||||||
|
if (opt.read_timeout)
|
||||||
|
{
|
||||||
|
double waittm;
|
||||||
waittm = (wtimer_read (timer) - last_successful_read_tm) / 1000;
|
waittm = (wtimer_read (timer) - last_successful_read_tm) / 1000;
|
||||||
if (waittm + tmout > opt.read_timeout)
|
if (waittm + tmout > opt.read_timeout)
|
||||||
{
|
{
|
||||||
@ -277,6 +279,7 @@ fd_read_body (int fd, FILE *out, long toread, long startpos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ret = fd_read (fd, dlbuf, rdsize, tmout);
|
ret = fd_read (fd, dlbuf, rdsize, tmout);
|
||||||
|
|
||||||
if (ret == 0 || (ret < 0 && errno != ETIMEDOUT))
|
if (ret == 0 || (ret < 0 && errno != ETIMEDOUT))
|
||||||
|
Loading…
Reference in New Issue
Block a user