From c1751a59ac28e0b137ceb53b95648057b45724ef Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 8 Jan 2019 14:55:44 +0100 Subject: [PATCH] rec: Load the Lua script in the distributor threads, for TCP --- pdns/pdns_recursor.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index bfc392f46c..606da49e61 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -3959,8 +3959,9 @@ try if (threadInfo.isWorker) setupNODThread(); #endif /* NOD_ENABLED */ - - if(threadInfo.isWorker) { + + /* the listener threads handle TCP queries */ + if(threadInfo.isWorker || threadInfo.isListener) { try { if(!::arg()["lua-dns-script"].empty()) { t_pdl = std::make_shared(); @@ -4096,7 +4097,8 @@ try } if (t_pdl != nullptr) { // lua-dns-script directive is present, call the maintenance callback if needed - if (threadInfo.isWorker) { + /* remember that the listener threads handle TCP queries */ + if (threadInfo.isWorker || threadInfo.isListener) { // Only on threads processing queries if(g_now.tv_sec - last_lua_maintenance >= luaMaintenanceInterval) { t_pdl->maintenance(); -- 2.47.2