mirror of
https://github.com/curl/curl.git
synced 2026-06-22 06:25:38 +03:00
Make sure dns cache timeout -1 really means forever, as it is documented to
be. Simply skip the pruning.
This commit is contained in:
parent
e0c0b2ba7d
commit
e2b6a45cfa
1 changed files with 5 additions and 0 deletions
|
|
@ -200,6 +200,11 @@ hostcache_prune(curl_hash *hostcache, int cache_timeout, int now)
|
|||
void Curl_hostcache_prune(struct SessionHandle *data)
|
||||
{
|
||||
time_t now;
|
||||
|
||||
if(data->set.dns_cache_timeout == -1)
|
||||
/* cache forever means never prune! */
|
||||
return;
|
||||
|
||||
if(data->share)
|
||||
Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue