mirror of
https://github.com/curl/curl.git
synced 2026-05-30 11:27:29 +03:00
cares: fix missing lazy init for CURLOPT_DNS_SERVERS
When setting option CURLOPT_DNS_SERVERS, the ares channel was not properly initialized and the setting failed. Fixes #17119 Reported-by: calvin2021y on github Closes #17127
This commit is contained in:
parent
4872dafd80
commit
24dd825ed5
1 changed files with 4 additions and 0 deletions
|
|
@ -816,6 +816,10 @@ CURLcode Curl_set_dns_servers(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
#ifdef HAVE_CARES_SERVERS_CSV
|
||||
result = async_ares_init_lazy(data);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
#ifdef HAVE_CARES_PORTS_CSV
|
||||
ares_result = ares_set_servers_ports_csv(ares->channel, servers);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue