From 16eb618d77016cd647a3ce60f916653913716f38 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 26 Jun 2018 18:11:32 +0200 Subject: 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 10 milliseconds so that localhost or names in the OS resolver cache gets detected and used faster. --- lib/asyn-thread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/asyn-thread.c') 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 -- cgit v1.2.1