]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove just enough entries from the cache, not one more than asked 5480/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 20 Jun 2017 15:09:56 +0000 (17:09 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 30 Jun 2017 10:47:13 +0000 (12:47 +0200)
(cherry picked from commit f3cb7c78abe3ad639d4583880ae9302b3be99a9e)

pdns/cachecleaner.hh

index fdeeb2c190015595bee14c0e573a17f8e3a0cfbb..2566e19d6c91ac9483f9540a7fa0f1b313230484 100644 (file)
@@ -60,7 +60,7 @@ template <typename T> void pruneCollection(T& collection, unsigned int maxCached
     else
       ++iter;
 
-    if(toTrim && erased > toTrim)
+    if(toTrim && erased >= toTrim)
       break;
   }