diff --git a/client.go b/client.go index 9ca53d2..93b5994 100644 --- a/client.go +++ b/client.go @@ -8,6 +8,7 @@ import ( "fmt" "io" "net" + "strconv" "strings" "sync" "sync/atomic" @@ -1653,7 +1654,7 @@ func addMissingPort(addr string, isTLS bool) string { if isTLS { port = 443 } - return fmt.Sprintf("%s:%d", addr, port) + return net.JoinHostPort(addr, strconv.Itoa(port)) } // PipelineClient pipelines requests over a limited set of concurrent