소스 검색

Fix: fakedns return ErrEmptyResponse without result (#926)

sixg0000d 4 년 전
부모
커밋
bad6cdfb88
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      app/dns/nameserver_fakedns.go

+ 4 - 1
app/dns/nameserver_fakedns.go

@@ -44,5 +44,8 @@ func (f *FakeDNSServer) QueryIP(ctx context.Context, domain string, _ net.IP, op
 
 	newError(f.Name(), " got answer: ", domain, " -> ", ips).AtInfo().WriteToLog()
 
-	return netIP, nil
+	if len(netIP) > 0 {
+		return netIP, nil
+	}
+	return nil, dns.ErrEmptyResponse
 }