From 16207ec6ba9c8710635e80236e2a3f30dd77face Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 20 Oct 2014 14:54:04 +0200 Subject: [PATCH] make sure we don't launch the query distribution thread if configured to run unthreaded --- pdns/pdns_recursor.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 1c43143e1f..e0784af9ac 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1911,7 +1911,9 @@ int serviceMain(int argc, char*argv[]) } Utility::dropUserPrivs(newuid); - g_numThreads = ::arg().asNum("threads") + ::arg().mustDo("pdns-distributes-queries"); + g_numThreads = ::arg().asNum("threads"); + if(g_numThreads > 1) + g_numThreads += ::arg().mustDo("pdns-distributes-queries"); makeThreadPipes(); -- 2.47.2