diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-10-01 23:25:26 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-10-01 23:25:26 +0000 |
commit | 9f77771ff9708629cc9866909e3d0883028bca63 (patch) | |
tree | 14ab0ef19c9ae7b9acef849cb92abbff7b000798 /lib | |
parent | f0fa858885a490c4184f82e7273656be83a5c586 (diff) |
faster bailout on timeouts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connect.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c index 8ff3dd16f..ef891d713 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -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 */ } |