Skip to content

Commit

Permalink
feat: check domain empty string (apache#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
twz915 authored Sep 6, 2024
1 parent 447cf73 commit 7789818
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 7789818

Please sign in to comment.