]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/communicator.cc
add default for empty value to asNum(), and use a value of 1 for all thread settings...
[thirdparty/pdns.git] / pdns / communicator.cc
index 40aa9e1b5505cca0642b21f13069f3e913d0bea3..41e7e56ca7027d8fcd8b111b2644284e83e0593b 100644 (file)
@@ -58,7 +58,7 @@ void CommunicatorClass::go()
 {
   pthread_t tid;
   pthread_create(&tid,0,&launchhelper,this); // Starts CommunicatorClass::mainloop()
-  for(int n=0; n < ::arg().asNum("retrieval-threads"); ++n)
+  for(int n=0; n < ::arg().asNum("retrieval-threads", 1); ++n)
     pthread_create(&tid, 0, &retrieveLaunchhelper, this); // Starts CommunicatorClass::retrievalLoopThread()
 
   d_preventSelfNotification = ::arg().mustDo("prevent-self-notification");