Skip to content
Snippets Groups Projects
Commit 31860ab8 authored by Romulo A. Ceccon's avatar Romulo A. Ceccon Committed by Daniel Stenberg
Browse files

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 030a2b8c.

Bug: http://curl.haxx.se/bug/view.cgi?id=1327
parent 2070a140
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment