]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Only init Lua for workers (both UDP and TCP)
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 1 Sep 2023 07:06:13 +0000 (09:06 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Sep 2023 11:20:54 +0000 (13:20 +0200)
Now that distributor threads do no longer process (TCP) queries, no need to have Lua inited for those

pdns/recursordist/rec-main.cc

index 997882f9cb8066e63ae73dbec4e05201e8ac37a3..0d863ff354d7c0260c3d9d347c44721bb3d0ec22 100644 (file)
@@ -2575,8 +2575,7 @@ static void runLuaMaintenance(RecThreadInfo& threadInfo, time_t& last_lua_mainte
 {
   if (t_pdl != nullptr) {
     // lua-dns-script directive is present, call the maintenance callback if needed
-    /* remember that the listener threads handle TCP queries */
-    if (threadInfo.isWorker() || threadInfo.isListener()) {
+    if (threadInfo.isWorker()) { // either UDP of TCP worker
       // Only on threads processing queries
       if (g_now.tv_sec - last_lua_maintenance >= luaMaintenanceInterval) {
         struct timeval start