Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
张洁俊(Jack) committed Jan 19, 2024
1 parent e909617 commit 97feadc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions opensearchtransport/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ func (c *Client) getNodeURL(node nodeInfo, scheme string) *url.URL {
host = strings.Split(addrs[0], ":")[0]
}
}

port = ports[len(ports)-1]
if len(port) == 0 {
port = ports[len(ports)-1]
}

u := &url.URL{
Scheme: scheme,
Host: net.JoinHostPort(host, port),
Expand Down

0 comments on commit 97feadc

Please sign in to comment.