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