1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Simplify internal API

This commit is contained in:
Dimitrij Denissenko
2015-04-17 14:18:44 +01:00
parent 60e0221c3d
commit a5891da2f6
4 changed files with 19 additions and 39 deletions

View File

@ -67,13 +67,9 @@ func (c *Pipeline) Exec() ([]Cmder, error) {
return cmds, err
}
if err := c.execCmds(cn, cmds); err != nil {
c.client.freeConn(cn, err)
return cmds, err
}
c.client.putConn(cn)
return cmds, nil
err = c.execCmds(cn, cmds)
c.client.putConn(cn, err)
return cmds, err
}
func (c *Pipeline) execCmds(cn *conn, cmds []Cmder) error {