1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

better time selection for the connect timeout

This commit is contained in:
Daniel Stenberg 2002-02-22 15:44:37 +00:00
parent 417c8fb602
commit b1ffe7b74a

View File

@ -364,8 +364,13 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
#endif #endif
/* get the most strict timeout of the ones converted to milliseconds */ /* get the most strict timeout of the ones converted to milliseconds */
if(data->set.timeout && if(data->set.timeout && data->set.connecttimeout) {
(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; timeout_ms = data->set.timeout*1000;
else else
timeout_ms = data->set.connecttimeout*1000; timeout_ms = data->set.connecttimeout*1000;