]> granicus.if.org Git - pdns/commitdiff
Do not reset per query counters when setQueryCount(true)
authorPavel Odintsov <pavel@cloudflare.com>
Fri, 31 Aug 2018 12:37:09 +0000 (13:37 +0100)
committerPavel Odintsov <pavel@cloudflare.com>
Fri, 31 Aug 2018 12:37:09 +0000 (13:37 +0100)
pdns/dnsdist-web.cc

index 808f61dc014d3466fb40420dd733afcad890a5f7..755a0f07403cab33c27111527678d7b61549f14e 100644 (file)
@@ -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();