Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 8, 2024
1 parent a566625 commit 7b846c4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions internal/webconnectivityalgo/dnswhoami.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

0 comments on commit 7b846c4

Please sign in to comment.