diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest/testdb.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest/testdb.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest/testdb.go b/Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest/testdb.go index 5f955c424..b6f205b7f 100644 --- a/Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest/testdb.go +++ b/Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest/testdb.go @@ -49,15 +49,18 @@ func Dial() (redis.Conn, error) { _, err = c.Do("SELECT", "9") if err != nil { + c.Close() return nil, err } n, err := redis.Int(c.Do("DBSIZE")) if err != nil { + c.Close() return nil, err } if n != 0 { + c.Close() return nil, errors.New("database #9 is not empty, test can not continue") } |