From 72bff357518b6abdc4deb02ddb01fa519b3d4bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Wed, 1 Apr 2026 12:18:47 +0200 Subject: [PATCH] [client] IPv6 friendly connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit parsedURL.Hostname() strips IPv6 brackets. For http://[::1]:443, this turns it into ::1:443, which is not a valid host:port target for gRPC. Additionally, fmt.Sprintf("%s:%s", hostname, port) produces a trailing colon when the URL has no explicit port—http://example.com becomes example.com:. Both cases break the initial dial and reconnect paths. Use parsedURL.Host directly instead. --- flow/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/client/client.go b/flow/client/client.go index 93d38b0ea..6d922d100 100644 --- a/flow/client/client.go +++ b/flow/client/client.go @@ -75,7 +75,7 @@ func NewClient(addr, payload, signature string, interval time.Duration) (*GRPCCl grpc.WithDefaultServiceConfig(`{"healthCheckConfig": {"serviceName": ""}}`), ) - target := fmt.Sprintf("%s:%s", parsedURL.Hostname(), parsedURL.Port()) + target := parsedURL.Host conn, err := grpc.NewClient(target, opts...) if err != nil { return nil, fmt.Errorf("creating new grpc client: %w", err)