summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/asyn-thread.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-22 12:41:50 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-22 12:48:58 (GMT)
commite9e8dcee6b21bafdb9593633dc845400bc060983 (patch)
treeadb81a4a209d0d2f02cf1106d5b63dbb9306de24 /Utilities/cmcurl/lib/asyn-thread.c
parentded211ae469530a08774094e1162247117f85ffd (diff)
parent18812a9c3d395b368d8f3d85394b346472c8e858 (diff)
downloadCMake-e9e8dcee6b21bafdb9593633dc845400bc060983.zip
CMake-e9e8dcee6b21bafdb9593633dc845400bc060983.tar.gz
CMake-e9e8dcee6b21bafdb9593633dc845400bc060983.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2018-09-04 (432eb5f5)
Diffstat (limited to 'Utilities/cmcurl/lib/asyn-thread.c')
-rw-r--r--Utilities/cmcurl/lib/asyn-thread.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Utilities/cmcurl/lib/asyn-thread.c b/Utilities/cmcurl/lib/asyn-thread.c
index b11fab2..2a59294 100644
--- a/Utilities/cmcurl/lib/asyn-thread.c
+++ b/Utilities/cmcurl/lib/asyn-thread.c
@@ -182,8 +182,6 @@ static struct thread_sync_data *conn_thread_sync_data(struct connectdata *conn)
return &(((struct thread_data *)conn->async.os_specific)->tsd);
}
-#define CONN_THREAD_SYNC_DATA(conn) &(((conn)->async.os_specific)->tsd);
-
/* Destroy resolver thread synchronization data */
static
void destroy_thread_sync_data(struct thread_sync_data * tsd)
@@ -481,8 +479,10 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
DEBUGASSERT(conn && td);
/* wait for the thread to resolve the name */
- if(Curl_thread_join(&td->thread_hnd))
- result = getaddrinfo_complete(conn);
+ if(Curl_thread_join(&td->thread_hnd)) {
+ if(entry)
+ result = getaddrinfo_complete(conn);
+ }
else
DEBUGASSERT(0);
@@ -572,10 +572,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