Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backends/redis/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func tryConnect(machines []string, password string, timeout bool) (redis.Conn, i
var conn redis.Conn
var db int

idx := strings.Index(address, "/")
idx := strings.LastIndex(address, "/")
if idx != -1 {
// a database is provided
db, err = strconv.Atoi(address[idx+1:])
Expand Down Expand Up @@ -293,4 +293,4 @@ func (c *Client) WatchPrefix(prefix string, keys []string, waitIndex uint64, sto
case r := <- c.pscChan:
return r.waitIndex, r.err
}
}
}