mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
hostip: don't remove DNS entries that are in use
hostcache_timestamp_remove() should remove old *unused* entries from the
host cache, but it never checked whether the entry was actually in
use. This complements commit 030a2b8cb
.
Bug: http://curl.haxx.se/bug/view.cgi?id=1327
This commit is contained in:
parent
2070a140fd
commit
31860ab8c8
@ -237,7 +237,7 @@ hostcache_timestamp_remove(void *datap, void *hc)
|
||||
(struct hostcache_prune_data *) datap;
|
||||
struct Curl_dns_entry *c = (struct Curl_dns_entry *) hc;
|
||||
|
||||
return (data->now - c->timestamp >= data->cache_timeout);
|
||||
return !c->inuse && (data->now - c->timestamp >= data->cache_timeout);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user