Merge pull request #63 from bewiwi/master
Fix redis : change ending call with "\r\n"
This commit is contained in:
commit
ad6dcb478d
|
@ -126,7 +126,7 @@ func (g *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error {
|
||||||
if addr.User != nil {
|
if addr.User != nil {
|
||||||
pwd, set := addr.User.Password()
|
pwd, set := addr.User.Password()
|
||||||
if set && pwd != "" {
|
if set && pwd != "" {
|
||||||
c.Write([]byte(fmt.Sprintf("AUTH %s\n", pwd)))
|
c.Write([]byte(fmt.Sprintf("AUTH %s\r\n", pwd)))
|
||||||
|
|
||||||
r := bufio.NewReader(c)
|
r := bufio.NewReader(c)
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ func (g *Redis) gatherServer(addr *url.URL, acc plugins.Accumulator) error {
|
||||||
g.c = c
|
g.c = c
|
||||||
}
|
}
|
||||||
|
|
||||||
g.c.Write([]byte("info\n"))
|
g.c.Write([]byte("info\r\n"))
|
||||||
|
|
||||||
r := bufio.NewReader(g.c)
|
r := bufio.NewReader(g.c)
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ func TestRedisGeneratesMetrics(t *testing.T) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if line != "info\n" {
|
if line != "info\r\n" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ func TestRedisCanPullStatsFromMultipleServers(t *testing.T) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if line != "info\n" {
|
if line != "info\r\n" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue