From: Charles-Henri Bruyand Date: Thu, 17 May 2018 18:22:21 +0000 (+0200) Subject: rec: restrict maintenance() callback to worker threads X-Git-Tag: dnsdist-1.3.1~26^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb554472ae5e992339fee7fa0285ee07f7e4376b;p=thirdparty%2Fpdns.git rec: restrict maintenance() callback to worker threads --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index fbd83cdb3c..8f059369f6 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -3556,7 +3556,7 @@ try last_carbon = g_now.tv_sec; } } - if (t_pdl != nullptr) { + if (worker && t_pdl != nullptr) { // lua-dns-script directive is present, call the maintenance callback if needed if(g_now.tv_sec - last_lua_maintenance >= luaMaintenanceInterval) { t_pdl->maintenance();