]> granicus.if.org Git - pdns/commitdiff
fix incredibly stupid throttle cache pruning bug
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 24 Mar 2006 22:28:58 +0000 (22:28 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 24 Mar 2006 22:28:58 +0000 (22:28 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@615 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/syncres.hh

index 49cdd49b19c3d599249f91849c691f40800c9cbf..a55f511df64e7fde61fd308632844faad3859d11 100644 (file)
@@ -43,12 +43,13 @@ public:
   {
     if(now > d_last_clean + 60 ) {
       d_last_clean=now;
-      for(typename cont_t::iterator i=d_cont.begin();i!=d_cont.end();) 
-       if( i->second.ttd > now) {
+      for(typename cont_t::iterator i=d_cont.begin();i!=d_cont.end();) {
+       if( i->second.ttd < now) {
          d_cont.erase(i++);
        }
        else
          ++i;
+      }
     }
 
     typename cont_t::iterator i=d_cont.find(t);