Fix DNS Lookup

This commit is contained in:
世界
2025-04-22 23:08:24 +08:00
parent 7a109569f9
commit 284f10b296
2 changed files with 7 additions and 5 deletions

View File

@@ -332,8 +332,7 @@ func (r *Router) Lookup(ctx context.Context, domain string, options adapter.DNSQ
r.logger.ErrorContext(ctx, E.Cause(err, "lookup failed for ", domain))
}
} else if len(responseAddrs) == 0 {
r.logger.ErrorContext(ctx, "lookup failed for ", domain, ": empty result")
err = RcodeNameError
panic("unexpected empty result")
}
}
responseAddrs, cached = r.client.LookupCache(domain, options.Strategy)