From: bert hubert Date: Mon, 20 Oct 2014 12:54:04 +0000 (+0200) Subject: make sure we don't launch the query distribution thread if configured to run unthreaded X-Git-Tag: rec-3.7.0-rc1~201^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16207ec6ba9c8710635e80236e2a3f30dd77face;p=thirdparty%2Fpdns.git make sure we don't launch the query distribution thread if configured to run unthreaded --- 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();