From: Remi Gacogne Date: Wed, 7 Apr 2021 10:11:10 +0000 (+0200) Subject: dnsdist: Prevent a race when updating the TeeAction metrics X-Git-Tag: dnsdist-1.6.0-rc1~1^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ac6d2edcd93f8d12201b06df8914e247342d58c;p=thirdparty%2Fpdns.git dnsdist: Prevent a race when updating the TeeAction metrics --- diff --git a/pdns/dnsdist-lua-actions.cc b/pdns/dnsdist-lua-actions.cc index f75372f467..0cb97ec749 100644 --- a/pdns/dnsdist-lua-actions.cc +++ b/pdns/dnsdist-lua-actions.cc @@ -143,15 +143,15 @@ private: mutable std::atomic d_senderrors{0}; unsigned long d_recverrors{0}; mutable std::atomic d_queries{0}; - unsigned long d_responses{0}; - unsigned long d_nxdomains{0}; - unsigned long d_servfails{0}; - unsigned long d_refuseds{0}; - unsigned long d_formerrs{0}; - unsigned long d_notimps{0}; - unsigned long d_noerrors{0}; - mutable unsigned long d_tcpdrops{0}; - unsigned long d_otherrcode{0}; + stat_t d_responses{0}; + stat_t d_nxdomains{0}; + stat_t d_servfails{0}; + stat_t d_refuseds{0}; + stat_t d_formerrs{0}; + stat_t d_notimps{0}; + stat_t d_noerrors{0}; + mutable stat_t d_tcpdrops{0}; + stat_t d_otherrcode{0}; std::atomic d_pleaseQuit{false}; bool d_addECS{false}; };