summaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-15 16:17:55 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-18 00:20:42 +0200
commitdc90f510657875a95d8f82def2c1e79c7284c9dc (patch)
tree432a53fd7aec4d10e9b7ba79b872cb626c9c143c /lib/urldata.h
parent325866fd6fdd80fa582dce5a1acb4a88ce51f5c1 (diff)
downloadcurl-dc90f510657875a95d8f82def2c1e79c7284c9dc.tar.gz
connect: improve happy eyeballs handling
For QUIC but also for regular TCP when the second family runs out of IPs with a failure while the first family is still trying to connect. Separated the timeout handling for IPv4 and IPv6 connections when they both have a number of addresses to iterate over.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 33ec160ac..74b43abaa 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -981,8 +981,10 @@ struct connectdata {
struct curltime connecttime;
/* The two fields below get set in Curl_connecthost */
int num_addr; /* number of addresses to try to connect to */
- timediff_t timeoutms_per_addr; /* how long time in milliseconds to spend on
- trying to connect to each IP address */
+
+ /* how long time in milliseconds to spend on trying to connect to each IP
+ address, per family */
+ timediff_t timeoutms_per_addr[2];
const struct Curl_handler *handler; /* Connection's protocol handler */
const struct Curl_handler *given; /* The protocol first given */
@@ -1245,7 +1247,8 @@ typedef enum {
EXPIRE_100_TIMEOUT,
EXPIRE_ASYNC_NAME,
EXPIRE_CONNECTTIMEOUT,
- EXPIRE_DNS_PER_NAME,
+ EXPIRE_DNS_PER_NAME, /* family1 */
+ EXPIRE_DNS_PER_NAME2, /* family2 */
EXPIRE_HAPPY_EYEBALLS_DNS, /* See asyn-ares.c */
EXPIRE_HAPPY_EYEBALLS,
EXPIRE_MULTI_PENDING,