]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make sure we don't launch the query distribution thread if configured to run unthreaded
authorbert hubert <bert.hubert@netherlabs.nl>
Mon, 20 Oct 2014 12:54:04 +0000 (14:54 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Mon, 20 Oct 2014 12:54:04 +0000 (14:54 +0200)
pdns/pdns_recursor.cc

index 1c43143e1fed343ca4dc16228a5e7ad6cb6c5c72..e0784af9ac91c98ba0706b6ca5d5feb7c43b8b8d 100644 (file)
@@ -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();