]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Don't warn about outgoing DoH worker then there isn't any
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 6 Sep 2021 16:12:45 +0000 (18:12 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 13 Sep 2021 13:34:33 +0000 (15:34 +0200)
pdns/dnsdistdist/dnsdist-nghttp2.cc

index dbb3c86e3c39c73121048c9f18c47c48cd2b3b92..033d043c7469262eac1e2b119abfa7ae1873c112 100644 (file)
@@ -1174,8 +1174,10 @@ void DoHClientCollection::addThread()
 bool initDoHWorkers()
 {
 #ifdef HAVE_NGHTTP2
-  g_dohClientThreads = std::make_unique<DoHClientCollection>(g_outgoingDoHWorkerThreads);
-  g_dohClientThreads->addThread();
+  if (g_outgoingDoHWorkerThreads > 0) {
+    g_dohClientThreads = std::make_unique<DoHClientCollection>(g_outgoingDoHWorkerThreads);
+    g_dohClientThreads->addThread();
+  }
   return true;
 #else
   return false;