On Sun, 30 Aug 2020, Narasimha M via curl-library wrote:
If I set CURLOPT_DNS_CACHE_TIMEOUT to 2 sec, I expect the application to
contact the DNS server and resolve the name every 2 seconds. But I see that
DNS requests are sent only once for the first time and never thereafter.
I think this is what happens:
libcurl prioritizes reusing an existing "live" connection, and when doing so
it doesn't have to resolve the host name. The entire loop is done using that
single connection, so there was only one name resolve necessary.
--
/ daniel.haxx.se | Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html