From: Otto Moerbeek Date: Fri, 1 Sep 2023 07:06:13 +0000 (+0200) Subject: Only init Lua for workers (both UDP and TCP) X-Git-Tag: rec-5.0.0-alpha2~58^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49edd025edc7ff3ac2db7caa37f48d66e4166940;p=thirdparty%2Fpdns.git Only init Lua for workers (both UDP and TCP) Now that distributor threads do no longer process (TCP) queries, no need to have Lua inited for those --- diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index 997882f9cb..0d863ff354 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -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