mirror of
https://github.com/curl/curl.git
synced 2026-08-13 04:10:53 +03:00
Revert "urldata: move async resolver state from easy handle to connectdata"
This reverts commit 56a4db2e4e (#12198)
We want the c-ares channel to be held in the easy handle, not per
connection - for performance.
Closes #12524
This commit is contained in:
parent
9f2d2290d1
commit
907eea0804
11 changed files with 138 additions and 155 deletions
30
lib/easy.c
30
lib/easy.c
|
|
@ -973,6 +973,36 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CURLRES_ASYNCH
|
||||
/* Clone the resolver handle, if present, for the new handle */
|
||||
if(Curl_resolver_duphandle(outcurl,
|
||||
&outcurl->state.async.resolver,
|
||||
data->state.async.resolver))
|
||||
goto fail;
|
||||
#endif
|
||||
|
||||
#ifdef USE_ARES
|
||||
{
|
||||
CURLcode rc;
|
||||
|
||||
rc = Curl_set_dns_servers(outcurl, data->set.str[STRING_DNS_SERVERS]);
|
||||
if(rc && rc != CURLE_NOT_BUILT_IN)
|
||||
goto fail;
|
||||
|
||||
rc = Curl_set_dns_interface(outcurl, data->set.str[STRING_DNS_INTERFACE]);
|
||||
if(rc && rc != CURLE_NOT_BUILT_IN)
|
||||
goto fail;
|
||||
|
||||
rc = Curl_set_dns_local_ip4(outcurl, data->set.str[STRING_DNS_LOCAL_IP4]);
|
||||
if(rc && rc != CURLE_NOT_BUILT_IN)
|
||||
goto fail;
|
||||
|
||||
rc = Curl_set_dns_local_ip6(outcurl, data->set.str[STRING_DNS_LOCAL_IP6]);
|
||||
if(rc && rc != CURLE_NOT_BUILT_IN)
|
||||
goto fail;
|
||||
}
|
||||
#endif /* USE_ARES */
|
||||
|
||||
Curl_initinfo(outcurl);
|
||||
|
||||
outcurl->magic = CURLEASY_MAGIC_NUMBER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue