]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Prevent a race in the DelayPipe tests
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 7 Apr 2021 10:07:56 +0000 (12:07 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 16 Apr 2021 07:10:41 +0000 (09:10 +0200)
pdns/dnsdistdist/test-delaypipe_hh.cc

index e376cb93309cba0e2dc624d0ac3ebc5183deb9e5..6f5559a9e26d3da0eb3180471173d6670e2cd67e 100644 (file)
@@ -25,9 +25,9 @@ BOOST_AUTO_TEST_CASE(test_object_pipe) {
 
 };
 
-int done=0;
+std::atomic<uint64_t> done = 0;
 BOOST_AUTO_TEST_CASE(test_delay_pipe_small) {
-  done=0;
+  done = 0;
   struct Work
   {
     int i;