Config.in: timeout earlier when connecting to download servers
Some sites have broken DNS entries where some A or AAAA records point
to a nonexistent machine. This causes a long delay (~135sec here) before
a fallback to another IP is attempted. This is the case for example for
sigrok.org, which IPv6 entry is not reachable (at least from the few
locations I have access to, while other IPv6 servers are reachable).
Add a relatively small timeout on connect for the few download backends
where we can easily drive that setting:
- for curl and wget, that timeout only applies when establishing the
TCP connection, i.e. the three-way handshake;
- for scp and sftp, that timeout also include the ssh handshake;
- for svn, it is not explicit what the timeout is about, but the
documentation states "Timeout for HTTP requests in seconds".
In modern times, we expect that we can indeed establish those handshakes
in less than 10s; anything taking longer is in practice an unreachable
site...
For other download mechanism (bzr, cvs, git, hg), as well as
post-processing helpers (cargo, go), it does not seem possible to set
such a timeout.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>