]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Run tasks from houskeeping thread in a proper way. 11692/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 10 Jun 2022 13:39:36 +0000 (15:39 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 10 Jun 2022 13:50:06 +0000 (15:50 +0200)
Previously, this was only done if log-common-errors was true, due
to argument reversal.  In general task *would* be executed, as they
are also run after each query processed by SyncRes (so not after
packet cache hits).

Thanks to @jelu!

pdns/recursordist/rec-main.cc

index 301aa9b6be922f453a9c95b5e0886d837a0898c1..07d9e94dd607d8e7af7c690e15aface08016246e 100644 (file)
@@ -2085,7 +2085,7 @@ static void houseKeeping(void*)
     // Likley a few handler tasks could be moved to the taskThread
     if (info.isTaskThread()) {
       // TaskQueue is run always
-      runTasks(g_logCommonErrors, 10);
+      runTasks(10, g_logCommonErrors);
 
       static PeriodicTask ztcTask{"ZTC", 60};
       static map<DNSName, RecZoneToCache::State> ztcStates;