diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-03-12 14:03:26 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-03-15 11:03:11 +0100 |
commit | dbd16c3e256c6ce872829d1654785485361a0a78 (patch) | |
tree | 773dfedb2412a9cea9ea9b1d0119d35c11c2f389 /lib/urldata.h | |
parent | dc595210aead4782e19619033c2da89c13eb70d1 (diff) |
connect: happy eyeballs cleanup
Make sure each separate index in connn->tempaddr[] is used for a fixed
family (and only that family) during the connection process.
If family one takes a long time and family two fails immediately, the
previous logic could misbehave and retry the same family two address
repeatedly.
Reported-by: Paul Vixie
Reported-by: Jay Satiro
Fixes #5083
Fixes #4954
Closes #5089
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index fbb8b645e..4ee568fd6 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -957,6 +957,7 @@ struct connectdata { curl_socket_t sock[2]; /* two sockets, the second is used for the data transfer when doing FTP */ curl_socket_t tempsock[2]; /* temporary sockets for happy eyeballs */ + int tempfamily[2]; /* family used for the temp sockets */ Curl_recv *recv[2]; Curl_send *send[2]; @@ -1113,6 +1114,8 @@ struct connectdata { handle */ BIT(sock_accepted); /* TRUE if the SECONDARYSOCKET was created with accept() */ + BIT(parallel_connect); /* set TRUE when a parallel connect attempt has + started (happy eyeballs) */ }; /* The end of connectdata. */ |