mirror of
https://github.com/curl/curl.git
synced 2026-07-23 21:17:17 +03:00
better time selection for the connect timeout
This commit is contained in:
parent
417c8fb602
commit
b1ffe7b74a
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue