From 9c4899ad0f55309ccd70ece6e7ee8b8d27af93c8 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 30 Sep 2024 21:57:33 +0200 Subject: [PATCH] review --- challenge/dns01/nameserver.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/challenge/dns01/nameserver.go b/challenge/dns01/nameserver.go index ddf0b16105..a2149b3f98 100644 --- a/challenge/dns01/nameserver.go +++ b/challenge/dns01/nameserver.go @@ -16,9 +16,7 @@ import ( const defaultResolvConf = "/etc/resolv.conf" -var ( - fqdnSoaCache = &sync.Map{} -) +var fqdnSoaCache = &sync.Map{} var defaultNameservers = []string{ "google-public-dns-a.google.com:53", @@ -50,7 +48,7 @@ func (cache *soaCacheEntry) isExpired() bool { // ClearFqdnCache clears the cache of fqdn to zone mappings. Primarily used in testing. func ClearFqdnCache() { - fqdnSoaCache = &sync.Map{} + fqdnSoaCache.Clear() } func AddDNSTimeout(timeout time.Duration) ChallengeOption {