aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/hostip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 5837e64c7..61d238acd 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -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);
}
/*