]> granicus.if.org Git - pdns/commitdiff
rec: restrict maintenance() callback to worker threads
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 17 May 2018 18:22:21 +0000 (20:22 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 17 May 2018 18:24:34 +0000 (20:24 +0200)
pdns/pdns_recursor.cc

index fbd83cdb3c3ad25275c2f84714249609c676efa5..8f059369f66e96b32bf7180bfe136ad45c7378db 100644 (file)
@@ -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();