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

Merge pull request #290 from go-redis/fix/error-handling

Cleanup error handling code.
This commit is contained in:
Vladimir Mihailenco
2016-03-20 11:06:51 +03:00
3 changed files with 20 additions and 18 deletions

View File

@ -103,7 +103,7 @@ func (c *baseClient) process(cmd Cmder) {
if err := writeCmd(cn, cmd); err != nil {
c.putConn(cn, err, false)
cmd.setErr(err)
if shouldRetry(err) {
if err != nil && shouldRetry(err) {
continue
}
return
@ -111,7 +111,7 @@ func (c *baseClient) process(cmd Cmder) {
err = cmd.readReply(cn)
c.putConn(cn, err, readTimeout != nil)
if shouldRetry(err) {
if err != nil && shouldRetry(err) {
continue
}