mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
curl_global_init: Check if IPv6 works
- Curl_ipv6works() is not thread-safe until after the first call, so call it once during global init to avoid a possible race condition. Bug: https://github.com/curl/curl/issues/915 PR: https://github.com/curl/curl/pull/918
This commit is contained in:
parent
16fe3f6b0a
commit
c50980807c
@ -271,6 +271,8 @@ static CURLcode global_init(long flags, bool memoryfuncs)
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
(void)Curl_ipv6works();
|
||||
|
||||
#if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_INIT)
|
||||
if(libssh2_init(0)) {
|
||||
DEBUGF(fprintf(stderr, "Error: libssh2_init failed\n"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user