You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I call curl_easy_reset() when the multi interface is done with an easy handle, put it back in a pool and recycle them as more requests are made. I may set CURLOPT_DNS_SERVERS on some of those depending on the situation.
I expected the following
A subsequent call to curl_easy_setopt(curl, CURLOPT_DNS_SERVERS, ""); when reusing or curl_easy_reset() to reset the ares channel to its default settings. However, asyn-ares.c says:
/* If server is NULL or empty, this would purge all DNS servers
* from ares library, which will cause any and all queries to fail.
* So, just return OK if none are configured and do not actually make
* any changes to c-ares. This lets c-ares use its defaults, which
* it gets from the OS (for instance from /etc/resolv.conf on Linux).
*/
which is understandable. However, there seems to be no way to clear CURLOPT_DNS_SERVERS from an easy handle unless a brand new one is created, making reuse of the handle impossible.
curl/libcurl version
Any
operating system
Ubuntu 22
The text was updated successfully, but these errors were encountered:
Since c-ares has no function to restore this value to default, it
instead closes and re-inits the c-ares channel.
Reported-by: Deniz Sökmen
Fixes#16015
I did this
I call curl_easy_reset() when the multi interface is done with an easy handle, put it back in a pool and recycle them as more requests are made. I may set CURLOPT_DNS_SERVERS on some of those depending on the situation.
I expected the following
A subsequent call to
curl_easy_setopt(curl, CURLOPT_DNS_SERVERS, "");
when reusing or curl_easy_reset() to reset the ares channel to its default settings. However, asyn-ares.c says:which is understandable. However, there seems to be no way to clear CURLOPT_DNS_SERVERS from an easy handle unless a brand new one is created, making reuse of the handle impossible.
curl/libcurl version
Any
operating system
Ubuntu 22
The text was updated successfully, but these errors were encountered: