From 70915d972affbeb47f794211e2f28c2118cf8825 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 19 Apr 2019 17:03:36 +0200 Subject: [PATCH] dnsdist: Set correct names for DoH threads --- pdns/dnsdistdist/doh.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index 4b5ca90603..5e01af7d6b 100644 --- a/pdns/dnsdistdist/doh.cc +++ b/pdns/dnsdistdist/doh.cc @@ -23,6 +23,7 @@ #include "dnsdist-rules.hh" #include "dnsdist-xpf.hh" #include "libssl.hh" +#include "threadname.hh" using namespace std; @@ -462,6 +463,8 @@ string HTTPPathRule::toString() const void dnsdistclient(int qsock, int rsock) { + setThreadName("dnsdist/doh-cli"); + for(;;) { try { DOHUnit* du = nullptr; @@ -680,6 +683,7 @@ try std::thread dnsdistThread(dnsdistclient, dsc->dohquerypair[1], dsc->dohresponsepair[0]); dnsdistThread.detach(); // gets us better error reporting + setThreadName("dnsdist/doh"); // I wonder if this registers an IP address.. I think it does // this may mean we need to actually register a site "name" here and not the IP address h2o_hostconf_t *hostconf = h2o_config_register_host(&dsc->h2o_config, h2o_iovec_init(df->d_local.toString().c_str(), df->d_local.toString().size()), 65535); -- 2.39.5