Darien Raymond 7 年之前
父节点
当前提交
69820788b5
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/dns/udpns.go

+ 3 - 0
app/dns/udpns.go

@@ -230,7 +230,10 @@ func (s *ClassicNameServer) sendQuery(ctx context.Context, domain string) {
 }
 
 func (s *ClassicNameServer) findIPsForDomain(domain string) []net.IP {
+	s.RLock()
 	records, found := s.ips[domain]
+	s.RUnlock()
+
 	if found && len(records) > 0 {
 		var ips []net.IP
 		now := time.Now()