diff options
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index b7bdbca4e..844077cf4 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -269,7 +269,9 @@ void DNS::Rehash() /* Rehash the cache */ dnscache* newcache = new dnscache(); for (dnscache::iterator i = this->cache->begin(); i != this->cache->end(); i++) - newcache->insert(*i); + /* Dont include expired items (theres no point) */ + if (i->second.CalcTTLRemaining()) + newcache->insert(*i); delete this->cache; this->cache = newcache; |