From 3bbd328396745d0dd6c5585935040082a2c41e3e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 2 Jan 2018 22:15:50 +0100 Subject: Add rapid "happy eyeballs" connection fallback (RFC 8305) Try establishing connections in alternating address families in rapid intervals of 250 ms, adding more connections to the wait list until one succeeds (RFC 8305, happy eyeballs 2). It is important that WaitAndCheckErrors() waits until it has a successful connection, a time out, or all connections failed - otherwise the timing between tries might be wrong, and the final long wait might exit early because one connection failed without trying the others. Timing wise, this only works correctly on Linux, as select() counts down there. But we rely on that in some other places too, so this is not the time to fix that. Timeouts are only reported in the final long wait - the short inner waits are expected to time out more often, and multiple times, we do not want to report them. Closes: #668948 LP: #1308200 Gbp-Dch: paragraph --- doc/examples/configure-index | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/examples/configure-index b/doc/examples/configure-index index a765fbe42..153637ebc 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -257,6 +257,7 @@ Acquire Proxy "http://127.0.0.1:3128"; Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting Timeout "120"; + ConnectionAttemptDelayMsec "250"; Pipeline-Depth "5"; AllowRedirect "true"; @@ -285,6 +286,7 @@ Acquire AllowRedirect "true"; Timeout "120"; + ConnectionAttemptDelayMsec "250"; AllowRedirect "true"; // Cache Control. Note these do not work with Squid 2.0.2 @@ -312,6 +314,7 @@ Acquire }; Timeout "120"; + ConnectionAttemptDelayMsec "250"; /* Passive mode control, proxy, non-proxy and per-host. Pasv mode is preferred if possible */ -- cgit v1.2.3