aboutsummaryrefslogtreecommitdiff
path: root/lib/multihandle.h
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/multihandle.h
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/multihandle.h')
-rw-r--r--lib/multihandle.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/multihandle.h b/lib/multihandle.h
index b0cd0b821..91eca16c4 100644
--- a/lib/multihandle.h
+++ b/lib/multihandle.h
@@ -119,11 +119,6 @@ struct Curl_multi {
same actual socket) */
struct curl_hash sockhash;
- /* multiplexing wanted */
- bool multiplexing;
-
- bool recheckstate; /* see Curl_multi_connchanged */
-
/* Shared connection cache (bundles)*/
struct conncache conn_cache;
@@ -141,13 +136,17 @@ struct Curl_multi {
void *timer_userp;
struct curltime timer_lastcall; /* the fixed time for the timeout for the
previous callback */
- bool in_callback; /* true while executing a callback */
unsigned int max_concurrent_streams;
#ifdef ENABLE_WAKEUP
curl_socket_t wakeup_pair[2]; /* socketpair() used for wakeup
0 is used for read, 1 is used for write */
#endif
+ /* multiplexing wanted */
+ bool multiplexing;
+ bool recheckstate; /* see Curl_multi_connchanged */
+ bool in_callback; /* true while executing a callback */
+ bool ipv6_works;
};
#endif /* HEADER_CURL_MULTIHANDLE_H */