Revert "redis: support IPv6 addresses with no port"

This reverts commit 2af97cdbcb.
This commit is contained in:
Cameron Sparr 2015-11-11 15:33:58 -07:00
parent 2af97cdbcb
commit 00ee2529bc
2 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ changed to just run docker commands in the Makefile. See `make docker-run` and
### Bugfixes ### Bugfixes
- [#331](https://github.com/influxdb/telegraf/pull/331): Dont overwrite host tag in redis plugin. - [#331](https://github.com/influxdb/telegraf/pull/331): Dont overwrite host tag in redis plugin.
- [#336](https://github.com/influxdb/telegraf/pull/336): Mongodb plugin should take 2 measurements. - [#336](https://github.com/influxdb/telegraf/pull/336): Mongodb plugin should take 2 measurements.
- [#356](https://github.com/influxdb/telegraf/pull/356): Redis plugin IPv6 fix. Thanks @nkatsaros!
## v0.2.0 [2015-10-27] ## v0.2.0 [2015-10-27]

View File

@ -114,7 +114,7 @@ const defaultPort = "6379"
func (r *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error { func (r *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error {
_, _, err := net.SplitHostPort(addr.Host) _, _, err := net.SplitHostPort(addr.Host)
if err != nil { if err != nil {
addr.Host = net.JoinHostPort(addr.Host, defaultPort) addr.Host = addr.Host + ":" + defaultPort
} }
c, err := net.Dial("tcp", addr.Host) c, err := net.Dial("tcp", addr.Host)