From: Remi Gacogne Date: Tue, 8 Jan 2019 13:55:44 +0000 (+0100) Subject: rec: Load the Lua script in the distributor threads, for TCP X-Git-Tag: rec-4.2.0-alpha1~8^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1751a59ac28e0b137ceb53b95648057b45724ef;p=thirdparty%2Fpdns.git rec: Load the Lua script in the distributor threads, for TCP --- 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();