mirror of
https://github.com/mirror/wget.git
synced 2025-03-07 00:00:20 +08:00
Set interactive to true for bar progress.
* src/progress.c (bar_set_params): Set interactive to true. * src/retr.c (fd_read_body): Avoid call fd_read with 0 timeout.
This commit is contained in:
parent
fb5e2e628d
commit
c12a295496
@ -499,6 +499,7 @@ dot_finish (void *progress, double dltime)
|
||||
static void
|
||||
dot_set_params (const char *params)
|
||||
{
|
||||
current_impl->interactive = false;
|
||||
if (!params || !*params)
|
||||
params = opt.dot_style;
|
||||
|
||||
@ -1365,6 +1366,13 @@ display_image (char *buf)
|
||||
static void
|
||||
bar_set_params (const char *params)
|
||||
{
|
||||
/* if run_with_timeout() will be used for read, needs to disable interactive bar,
|
||||
or on every timeout(1s) we will have 'retry' with error "decryption failed" */
|
||||
#if (defined(HAVE_LIBSSL) || defined(HAVE_LIBSSL32)) && defined(OPENSSL_RUN_WITHTIMEOUT)
|
||||
current_impl->interactive = false;
|
||||
#else
|
||||
current_impl->interactive = true;
|
||||
#endif
|
||||
if (params)
|
||||
{
|
||||
for (const char *param = params; *param; )
|
||||
|
@ -425,7 +425,8 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread,
|
||||
{
|
||||
/* Don't let total idle time exceed read timeout. */
|
||||
tmout = opt.read_timeout - waittm;
|
||||
if (tmout < 0)
|
||||
/* if 0 fd_read can be 'blocked read' */
|
||||
if (tmout <= 0)
|
||||
{
|
||||
/* We've already exceeded the timeout. */
|
||||
ret = -1, errno = ETIMEDOUT;
|
||||
|
Loading…
Reference in New Issue
Block a user