aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.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/multi.c
parent872ea75acfe3405f1d3b18a07d70696c3d63a100 (diff)
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/multi.c')
-rw-r--r--lib/multi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 1b79d42a4..b641074d4 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -370,6 +370,7 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */
/* -1 means it not set by user, use the default value */
multi->maxconnects = -1;
multi->max_concurrent_streams = 100;
+ multi->ipv6_works = Curl_ipv6works(NULL);
#ifdef ENABLE_WAKEUP
if(Curl_socketpair(AF_UNIX, SOCK_STREAM, 0, multi->wakeup_pair) < 0) {