From 47dc5b5f1240c535368cd6496bd1e1bf31b68d7e Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 6 Sep 2021 18:12:45 +0200 Subject: [PATCH] dnsdist: Don't warn about outgoing DoH worker then there isn't any --- pdns/dnsdistdist/dnsdist-nghttp2.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdistdist/dnsdist-nghttp2.cc b/pdns/dnsdistdist/dnsdist-nghttp2.cc index dbb3c86e3c..033d043c74 100644 --- a/pdns/dnsdistdist/dnsdist-nghttp2.cc +++ b/pdns/dnsdistdist/dnsdist-nghttp2.cc @@ -1174,8 +1174,10 @@ void DoHClientCollection::addThread() bool initDoHWorkers() { #ifdef HAVE_NGHTTP2 - g_dohClientThreads = std::make_unique(g_outgoingDoHWorkerThreads); - g_dohClientThreads->addThread(); + if (g_outgoingDoHWorkerThreads > 0) { + g_dohClientThreads = std::make_unique(g_outgoingDoHWorkerThreads); + g_dohClientThreads->addThread(); + } return true; #else return false; -- 2.47.3