From 7b846c41455bdcbe99b8df13fd2cf53018214672 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Thu, 8 Feb 2024 13:05:20 +0100 Subject: [PATCH] x --- internal/webconnectivityalgo/dnswhoami.go | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/internal/webconnectivityalgo/dnswhoami.go b/internal/webconnectivityalgo/dnswhoami.go index 4b9816812..5145acc2f 100644 --- a/internal/webconnectivityalgo/dnswhoami.go +++ b/internal/webconnectivityalgo/dnswhoami.go @@ -73,21 +73,6 @@ func NewDNSWhoamiService(logger model.Logger) *DNSWhoamiService { } } -func (svc *DNSWhoamiService) cloneEntries() map[string]*dnsWhoamiInfoEntryWrapper { - defer svc.mu.Unlock() - svc.mu.Lock() - output := make(map[string]*dnsWhoamiInfoEntryWrapper) - for key, value := range svc.entries { - output[key] = &dnsWhoamiInfoEntryWrapper{ - T: value.T, - V: &DNSWhoamiInfoEntry{ - Address: value.V.Address, - }, - } - } - return output -} - type dnsWhoamiResolverSpec struct { name string factory func(logger model.Logger, netx *netxlite.Netx) model.Resolver @@ -180,3 +165,18 @@ func (svc *DNSWhoamiService) lockAndUpdate(now time.Time, serverAddr, whoamiAddr }, } } + +func (svc *DNSWhoamiService) cloneEntries() map[string]*dnsWhoamiInfoEntryWrapper { + defer svc.mu.Unlock() + svc.mu.Lock() + output := make(map[string]*dnsWhoamiInfoEntryWrapper) + for key, value := range svc.entries { + output[key] = &dnsWhoamiInfoEntryWrapper{ + T: value.T, + V: &DNSWhoamiInfoEntry{ + Address: value.V.Address, + }, + } + } + return output +}