Browse Source

Fix: fakedns return ErrEmptyResponse without result (#926)

sixg0000d 4 years ago
parent
commit
bad6cdfb88
1 changed files with 4 additions and 1 deletions
  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
 }