summaryrefslogtreecommitdiff
path: root/lib/asyn-ares.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-01-26 17:51:01 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-01-28 08:03:22 +0100
commit0b030a5b232bd9fc4fed90f0d1aaac69c189aa22 (patch)
tree0ca314f27beda02318a970993b0e3e9cd1ebcd8d /lib/asyn-ares.c
parent872ea75acfe3405f1d3b18a07d70696c3d63a100 (diff)
downloadcurl-0b030a5b232bd9fc4fed90f0d1aaac69c189aa22.tar.gz
global_init: move the IPv6 works status bool to multi handle
Previously it was stored in a global state which contributed to curl_global_init's thread unsafety. This boolean is now instead figured out in curl_multi_init() and stored in the multi handle. Less effective, but thread safe. Closes #4851
Diffstat (limited to 'lib/asyn-ares.c')
-rw-r--r--lib/asyn-ares.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index ed52a740b..b76e66548 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -669,7 +669,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
res->last_status = ARES_ENOTFOUND;
#ifdef ENABLE_IPV6 /* CURLRES_IPV6 */
if(family == PF_UNSPEC) {
- if(Curl_ipv6works()) {
+ if(Curl_ipv6works(conn)) {
res->num_pending = 2;
/* areschannel is already setup in the Curl_open() function */