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

Make Script and Pipeline interoperable. Fixes #18.

This commit is contained in:
Vladimir Mihailenco
2013-12-30 13:02:14 +02:00
parent af4ea559fe
commit 82a41314a0
5 changed files with 57 additions and 23 deletions

View File

@ -71,7 +71,6 @@ func (c *Multi) Exec(f func()) ([]Cmder, error) {
return cmds[1 : len(cmds)-1], err
}
// Synchronize writes and reads to the connection using mutex.
err = c.execCmds(cn, cmds)
if err != nil {
c.freeConn(cn, err)
@ -122,7 +121,7 @@ func (c *Multi) execCmds(cn *conn, cmds []Cmder) error {
var firstCmdErr error
// Parse replies.
// Loop starts from 1 to omit first cmduest (MULTI).
// Loop starts from 1 to omit MULTI cmd.
for i := 1; i < cmdsLen; i++ {
cmd := cmds[i]
val, err := cmd.parseReply(cn.rd)