]> granicus.if.org Git - pdns/commitdiff
oops, set number of threads before allocating room for them..
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 6 Feb 2010 13:47:53 +0000 (13:47 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 6 Feb 2010 13:47:53 +0000 (13:47 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1508 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/pdns_recursor.cc

index 586bb653fc3d06af3afdb75a32813e59e152dd09..b88e9fa4595427dea729c3ce3b09677f45d18fd6 100644 (file)
@@ -1648,14 +1648,14 @@ int serviceMain(int argc, char*argv[])
   writePid();
 #endif
   makeControlChannelSocket();        
-
+  g_numThreads = ::arg().asNum("threads");
+  
   makeThreadPipes();
   
   g_tcpTimeout=::arg().asNum("client-tcp-timeout");
   g_maxTCPPerClient=::arg().asNum("max-tcp-per-client");
   g_maxMThreads=::arg().asNum("max-mthreads");
-  
-  g_numThreads = ::arg().asNum("threads");
+
   if(g_numThreads == 1) {
     L<<Logger::Warning<<"Operating unthreaded"<<endl;
     recursorThread(0);