aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-02-22 15:44:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-02-22 15:44:37 +0000
commitb1ffe7b74a4235efa70908d9052922171fd51e14 (patch)
tree56fd8cb7ae2275444bd995a95df31bee46022ef8
parent417c8fb602fb32bb1e97ffb607aec988dfbc5df4 (diff)
better time selection for the connect timeout
-rw-r--r--lib/connect.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 7efa9f006..749f8cb2a 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -364,8 +364,13 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
#endif
/* get the most strict timeout of the ones converted to milliseconds */
- if(data->set.timeout &&
- (data->set.timeout < data->set.connecttimeout))
+ if(data->set.timeout && data->set.connecttimeout) {
+ if (data->set.timeout < data->set.connecttimeout)
+ timeout_ms = data->set.timeout*1000;
+ else
+ timeout_ms = data->set.connecttimeout*1000;
+ }
+ else if(data->set.timeout)
timeout_ms = data->set.timeout*1000;
else
timeout_ms = data->set.connecttimeout*1000;