Skip to content

Commit

Permalink
Merge pull request #6 from apache/master
Browse files Browse the repository at this point in the history
feat: check domain empty string (apache#1130)
  • Loading branch information
francisoliverlee authored Sep 14, 2024
2 parents e8a909a + 7789818 commit 6d92b9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion primitive/nsresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 6d92b9d

Please sign in to comment.