From 7789818d91efb24a6bc9873aac2c4c25946cfdbb Mon Sep 17 00:00:00 2001 From: WeizhongTu Date: Fri, 6 Sep 2024 11:45:04 +0800 Subject: [PATCH] feat: check domain empty string (#1130) --- primitive/nsresolver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitive/nsresolver.go b/primitive/nsresolver.go index 95e11962..d3f30667 100644 --- a/primitive/nsresolver.go +++ b/primitive/nsresolver.go @@ -99,7 +99,7 @@ type HttpResolver struct { func NewHttpResolver(instance string, domain ...string) *HttpResolver { d := DEFAULT_NAMESRV_ADDR - if len(domain) > 0 { + if len(domain) > 0 && domain[0] != "" { d = domain[0] } client := http.Client{Timeout: 10 * time.Second}