From: Remi Gacogne Date: Fri, 19 Apr 2019 15:03:36 +0000 (+0200) Subject: dnsdist: Set correct names for DoH threads X-Git-Tag: dnsdist-1.4.0-alpha2~6^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70915d972affbeb47f794211e2f28c2118cf8825;p=pdns dnsdist: Set correct names for DoH threads --- diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index 4b5ca9060..5e01af7d6 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);