diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-05-09 12:47:49 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-05-10 11:02:47 +0200 |
commit | e9fd794a616c10bd0d017a76f8fdccaf4cc76851 (patch) | |
tree | 26c659c7681db2b9bfcec3f0dadc302823376856 /lib/connect.c | |
parent | 8dfa378e528917fd253780fd8414795ed868ab0f (diff) | |
download | curl-e9fd794a616c10bd0d017a76f8fdccaf4cc76851.tar.gz |
multi: assign IDs to all timers and make each timer singleton
A) reduces the timeout lists drastically
B) prevents a lot of superfluous loops for timers that expires "in vain"
when it has actually already been extended to fire later on
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/connect.c b/lib/connect.c index 63ec50fdc..de84daa4f 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -1070,7 +1070,7 @@ static CURLcode singleipconnect(struct connectdata *conn, conn->connecttime = Curl_tvnow(); if(conn->num_addr > 1) - Curl_expire_latest(data, conn->timeoutms_per_addr); + Curl_expire_latest(data, conn->timeoutms_per_addr, EXPIRE_DNS_PER_NAME); /* Connect TCP sockets, bind UDP */ if(!isconnected && (conn->socktype == SOCK_STREAM)) { @@ -1169,7 +1169,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ conn->tempaddr[1] = NULL; conn->tempsock[0] = CURL_SOCKET_BAD; conn->tempsock[1] = CURL_SOCKET_BAD; - Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT); + Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT, EXPIRE_HAPPY_EYEBALLS); /* Max time for the next connection attempt */ conn->timeoutms_per_addr = |