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

Refactor reply parser.

This commit is contained in:
Vladimir Mihailenco
2014-01-06 16:06:30 +02:00
parent 78febcebe7
commit 4252b31cd9
7 changed files with 162 additions and 181 deletions

View File

@ -118,15 +118,12 @@ func (c *baseClient) run(cmd Cmder) {
return
}
val, err := cmd.parseReply(cn.rd)
if err != nil {
if err := cmd.parseReply(cn.rd); err != nil {
c.freeConn(cn, err)
cmd.setErr(err)
return
}
c.putConn(cn)
cmd.setVal(val)
}
// Close closes the client, releasing any open resources.