From f74fe441f00966436164d4ecd05512cbb89133b8 Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Fri, 31 Aug 2018 13:37:09 +0100 Subject: [PATCH] Do not reset per query counters when setQueryCount(true) --- pdns/dnsdist-web.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index 808f61dc0..755a0f074 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -491,7 +491,7 @@ static void connectionThread(int sock, ComboAddress remote, string password, str } { - WriteLock wl(&g_qcount.queryLock); + ReadLock rl(&g_qcount.queryLock); std::string qname; const string qnamebase = "dnsdist_querycount_queries"; @@ -502,7 +502,6 @@ static void connectionThread(int sock, ComboAddress remote, string password, str const std::string label = "{qname=\"" + qname + "\"}"; output << qnamebase << label << " " << record.second << "\n"; } - g_qcount.records.clear(); } resp.body = output.str(); -- 2.50.0