summaryrefslogtreecommitdiff
path: root/lib/asyn-thread.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-06-26 18:11:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-06-27 13:01:00 +0200
commit3ef67c6861c9d6236a4339d3446a444767598a58 (patch)
tree9db047b03366f9709ece0075e547930c04b988af /lib/asyn-thread.c
parentb0a365f8a0e58b0f1929abb1c60dad31d34c0c2a (diff)
downloadcurl-3ef67c6861c9d6236a4339d3446a444767598a58.tar.gz
easy_perform: use *multi_timeout() to get wait times
... and trim the threaded Curl_resolver_getsock() to return zero millisecond wait times during the first three milliseconds so that localhost or names in the OS resolver cache gets detected and used faster. Closes #2685
Diffstat (limited to 'lib/asyn-thread.c')
-rw-r--r--lib/asyn-thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 894ca459b..c7c1a0086 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -574,10 +574,10 @@ int Curl_resolver_getsock(struct connectdata *conn,
(void)socks;
(void)numsocks;
ms = Curl_timediff(Curl_now(), reslv->start);
- if(ms < 10)
- milli = ms/3;
+ if(ms < 3)
+ milli = 0;
else if(ms <= 50)
- milli = 10;
+ milli = ms/3;
else if(ms <= 250)
milli = 50;
else