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:
@ -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)
|
||||
|
Reference in New Issue
Block a user