mirror of
https://github.com/curl/curl.git
synced 2026-05-23 02:36:21 +03:00
faster bailout on timeouts
This commit is contained in:
parent
f0fa858885
commit
9f77771ff9
1 changed files with 4 additions and 0 deletions
|
|
@ -206,6 +206,8 @@ CURLcode Curl_connecthost(struct connectdata *conn,
|
|||
/* get a new timeout for next attempt */
|
||||
after = Curl_tvnow();
|
||||
timeout_ms -= (long)(Curl_tvdiff(after, before)*1000);
|
||||
if(timeout_ms < 0)
|
||||
break;
|
||||
before = after;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -285,6 +287,8 @@ CURLcode Curl_connecthost(struct connectdata *conn,
|
|||
/* get a new timeout for next attempt */
|
||||
after = Curl_tvnow();
|
||||
timeout_ms -= (long)(Curl_tvdiff(after, before)*1000);
|
||||
if(timeout_ms < 0)
|
||||
break;
|
||||
before = after;
|
||||
continue; /* try next address */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue