From: Bert Hubert Date: Fri, 24 Mar 2006 22:28:58 +0000 (+0000) Subject: fix incredibly stupid throttle cache pruning bug X-Git-Tag: rec-3-0~138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=594c2ee71f75ca9361f79be12fca467ea93c106d;p=pdns fix incredibly stupid throttle cache pruning bug git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@615 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/syncres.hh b/pdns/syncres.hh index 49cdd49b1..a55f511df 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -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);