[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] altering connect time-out value

From: Thomas Dickey
Subject: Re: [Lynx-dev] altering connect time-out value
Date: Thu, 29 Jul 2004 20:08:12 -0400 (EDT)

On Thu, 29 Jul 2004 address@hidden wrote:

> when it can't connect to a link, Lynx 2.8.6dev.4 times out after  23 sec .
> in  lynx.cfg , there is a section :
>   # Specifies (in seconds) connect timeout. Default value is rather huge.
> the final line is my experiment, which makes no difference to behaviour,
> even after a reboot.  how can i make Lynx wait longer when trying a link ?
> i'ld like something like  5 min  (after all, you can use 'z' to disconnect).

I'm not sure.  In HTTCP.c, there's this (which is the implementation of

            while (ret <= 0) {
                fd_set writefds;

                 * Protect against an infinite loop.
                if ((tries++ / 10) >= connect_timeout) {
                    HTAlert(gettext("Connection failed (too many retries)."));
#ifdef INET6
                    if (res0)
#endif /* INET6 */
                    return HT_NO_DATA;
                select_timeout.tv_sec = connect_timeout;
                select_timeout.tv_usec = 0;
                select_timeout.tv_sec = 0;
                select_timeout.tv_usec = 100000;
#endif /* _WINDOWS_NSL */
                FD_SET((unsigned) *s, &writefds);
#ifdef SOCKS

What that says is that there are two cases:

        a) if lynx is compiled for windows (win32) it uses the
           connect_timeout value as documented.
        b) otherwise, it uses a timeout of 100 milliseconds (0.1 seconds),

and in either case, it loops, retrying a maximum of 10 times the value of
connect_timeout (which would cancel the effect of 0.1 seconds).

There are several places where the loop can be exited other than that -
but they're not logged.

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]