]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
setReplacePending: avoid lock
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 10 May 2021 08:16:10 +0000 (10:16 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Sat, 15 May 2021 22:45:45 +0000 (00:45 +0200)
pdns/auth-domaincache.cc

index df86df84837ced47b39db20694caf2146a2126a5..d3c55bbf5c77292f5e37cf92652f8773fb31b095 100644 (file)
@@ -160,7 +160,9 @@ void AuthDomainCache::setReplacePending()
   if (!d_ttl)
     return;
 
-  WriteLock globalLock(d_mut);
-  d_replacePending = true;
-  d_pendingAdds.clear();
+  {
+    WriteLock globalLock(d_mut);
+    d_replacePending = true;
+    d_pendingAdds.clear();
+  }
 }