From 1c4f2e1bd44482c2ef38012a76a255eee130cd03 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 8 Nov 2017 12:23:12 +0100 Subject: [PATCH] rec: Don't crash when asked to run with zero threads --- pdns/pdns_recursor.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index e987037e0..324c51468 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -2986,6 +2986,11 @@ static int serviceMain(int argc, char*argv[]) g_lowercaseOutgoing = ::arg().mustDo("lowercase-outgoing"); g_numWorkerThreads = ::arg().asNum("threads"); + if (g_numWorkerThreads < 1) { + L<