From eb554472ae5e992339fee7fa0285ee07f7e4376b Mon Sep 17 00:00:00 2001 From: Charles-Henri Bruyand Date: Thu, 17 May 2018 20:22:21 +0200 Subject: [PATCH] rec: restrict maintenance() callback to worker threads --- pdns/pdns_recursor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index fbd83cdb3..8f059369f 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(); -- 2.49.0