From 71ff50633e31c46b0aaa7441a39fb38f9c7d808e Mon Sep 17 00:00:00 2001 From: Nicholas Katsaros Date: Mon, 9 Nov 2015 21:56:28 -0500 Subject: [PATCH] redis: support IPv6 addresses with no port --- plugins/redis/redis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/redis/redis.go b/plugins/redis/redis.go index 95d5dc75b..f15d9557b 100644 --- a/plugins/redis/redis.go +++ b/plugins/redis/redis.go @@ -114,7 +114,7 @@ const defaultPort = "6379" func (r *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error { _, _, err := net.SplitHostPort(addr.Host) if err != nil { - addr.Host = addr.Host + ":" + defaultPort + addr.Host = net.JoinHostPort(addr.Host, defaultPort) } c, err := net.Dial("tcp", addr.Host)