From d4833f60cbf32443bf047bf39f13f450862d355e Mon Sep 17 00:00:00 2001 From: Ian Leue Date: Fri, 23 Aug 2019 10:19:47 -0400 Subject: [PATCH] Use ipv6-compliant methodology for joining host port (#640) * Use ipv6-compliant methodology for joining host port * Fix change --- client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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