From ddb1bc0fee4a3b2960f9bde1219bfb7e8aafd623 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Wed, 5 Jun 2019 13:03:07 +0300 Subject: [PATCH] - control: outgoing HTTP requests didn't work if target IP is IPv6 --- helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers.go b/helpers.go index afd4e34b..a32e4745 100644 --- a/helpers.go +++ b/helpers.go @@ -341,7 +341,7 @@ func customDialContext(ctx context.Context, network, addr string) (net.Conn, err var firstErr error firstErr = nil for _, a := range addrs { - addr = fmt.Sprintf("%s:%s", a.String(), port) + addr = net.JoinHostPort(a.String(), port) con, err := dialer.DialContext(ctx, network, addr) if err != nil { if firstErr == nil {