1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Fix db selection. Fixes #31.

This commit is contained in:
Vladimir Mihailenco
2014-07-08 11:24:19 +03:00
parent dc9bffa57d
commit 537971dca1
2 changed files with 15 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func (c *baseClient) conn() (*conn, error) {
}
func (c *baseClient) initConn(cn *conn) error {
if c.opt.Password == "" || c.opt.DB == 0 {
if c.opt.Password == "" && c.opt.DB == 0 {
return nil
}