]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move the pruning of the two now shared maps (failed servers and non-resolving ns...
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 2 Feb 2022 08:06:42 +0000 (09:06 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 2 Feb 2022 08:06:42 +0000 (09:06 +0100)
pdns/recursordist/rec-main.cc

index 202223fee4a27a5cb50d93cff7d5a89e98bc3abf..c44edd4024a210118e841fe6499b86fa12023198 100644 (file)
@@ -1797,14 +1797,11 @@ static void houseKeeping(void*)
         limit = now.tv_sec - 300;
         SyncRes::pruneNSSpeeds(limit);
       }
-      limit = now.tv_sec - SyncRes::s_serverdownthrottletime * 10;
-      SyncRes::pruneFailedServers(limit);
       limit = now.tv_sec - 2 * 3600;
       SyncRes::pruneEDNSStatuses(limit);
       SyncRes::pruneThrottledServers();
-      SyncRes::pruneNonResolving(now.tv_sec - SyncRes::s_nonresolvingnsthrottletime);
-      Utility::gettimeofday(&t_last_prune, nullptr);
       t_tcp_manager.cleanup(now);
+      Utility::gettimeofday(&t_last_prune, nullptr);
     }
 
     if (isHandlerThread()) {
@@ -1823,6 +1820,8 @@ static void houseKeeping(void*)
         if (g_aggressiveNSECCache) {
           g_aggressiveNSECCache->prune(now.tv_sec);
         }
+        SyncRes::pruneFailedServers(now.tv_sec - SyncRes::s_serverdownthrottletime * 10);
+        SyncRes::pruneNonResolving(now.tv_sec - SyncRes::s_nonresolvingnsthrottletime);
         s_last_RC_prune = now.tv_sec;
       }
       // Divide by 12 to get the original 2 hour cycle if s_maxcachettl is default (1 day)