summaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-12-23 22:19:25 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-12-23 22:21:24 +0100
commit5825aa149dc74050bb329b4491b556c6095ac4a8 (patch)
tree2d8ee265fbd36bc6ebb01edacc11468aef5dae56 /lib/urldata.h
parent7dc9393d3b1d78f9bc4349b28cff3c58b76a0d2b (diff)
downloadcurl-5825aa149dc74050bb329b4491b556c6095ac4a8.tar.gz
multi: connect fail => use next IP address
When using the multi interface and connecting to a host name that resolves to multiple IP addresses, there was no logic that made it continue to the next IP if connecting to the first address times out. This is now corrected.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 208ff4e6b..2765c3ebe 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -812,6 +812,15 @@ struct connectdata {
struct ConnectBits bits; /* various state-flags for this connection */
+ /* connecttime: when connect() is called on the current IP address. Used to
+ be able to track when to move on to try next IP - but only when the multi
+ interface is used. */
+ struct timeval connecttime;
+ /* The two fields below get set in Curl_connecthost */
+ int num_addr; /* number of addresses to try to connect to */
+ long timeoutms_per_addr; /* how long time in milliseconds to spend on
+ trying to connect to each IP address */
+
const struct Curl_handler * handler; /* Connection's protocol handler. */
long ip_version; /* copied from the SessionHandle at creation time */