diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest')
-rw-r--r-- | Godeps/_workspace/src/github.com/garyburd/redigo/internal/redistest/testdb.go | 5 |
1 files changed, 4 insertions, 1 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..3eb4bcd77 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 @@ -19,7 +19,7 @@ import ( "errors" "time" - "github.com/garyburd/redigo/redis" + "github.com/mattermost/platform/Godeps/_workspace/src/github.com/garyburd/redigo/redis" ) type testConn struct { @@ -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") } |