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