3 Commits

Author SHA1 Message Date
1049057f69 Set the recursion available flag 2020-06-23 02:16:56 -07:00
0622e00f64 Add JSON tags 2020-06-23 02:16:56 -07:00
c0f98d4a25 DNS changes
go mod tidy
2020-06-23 02:16:53 -07:00

View File

@ -172,8 +172,6 @@ func (m measurement) String() string {
}
func (s *Server) probeUpstreamLatency() {
if !s.once {
s.once = true
upstreams := s.upstreams()
results := make([]measurement, len(upstreams))
var wg sync.WaitGroup
@ -201,7 +199,7 @@ func (s *Server) probeUpstreamLatency() {
sort.Slice(results, func(i, j int) bool {
return results[i].rtt < results[j].rtt
})
log.Printf("probe results: %v %v", s.once, results)
log.Printf("probe results: %v", results)
for idx, result := range results {
upstreams[idx] = result.upstream
}
@ -209,7 +207,6 @@ func (s *Server) probeUpstreamLatency() {
defer s.upstreamMu.Unlock()
s.upstream = upstreams
}
}
func (s *Server) hostByName(n lcHostname) (string, bool) {
s.mu.Lock()