From: Remi Gacogne Date: Mon, 6 Sep 2021 16:12:45 +0000 (+0200) Subject: dnsdist: Don't warn about outgoing DoH worker then there isn't any X-Git-Tag: dnsdist-1.7.0-alpha1~23^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47dc5b5f1240c535368cd6496bd1e1bf31b68d7e;p=thirdparty%2Fpdns.git dnsdist: Don't warn about outgoing DoH worker then there isn't any --- 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;