Fix some missing net.JoinHostPort calls (#2305)
This commit is contained in:
1 parent
418129d564
commit
4bd249d347
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -660,7 +660,7 @@ func (c *Client) NewRequest(ctx context.Context, method, requestPath string, bod
|
||||
return nil, fmt.Errorf("error performing SRV lookup of http:tcp:%s : %w", u.Hostname(), err)
|
||||
}
|
||||
if len(addrs) > 0 {
|
||||
host = fmt.Sprintf("%s:%d", addrs[0].Target, addrs[0].Port)
|
||||
host = net.JoinHostPort(addrs[0].Target, fmt.Sprintf("%d", addrs[0].Port))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user