mirror of
https://github.com/redis/go-redis.git
synced 2025-08-08 23:42:06 +03:00
Cleanup error handling code.
This commit is contained in:
@@ -195,12 +195,12 @@ func (c *ClusterClient) process(cmd Cmder) {
|
||||
|
||||
// If there is no (real) error, we are done!
|
||||
err := cmd.Err()
|
||||
if err == nil || err == Nil || err == TxFailedErr {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// On network errors try random node.
|
||||
if isNetworkError(err) {
|
||||
if shouldRetry(err) {
|
||||
client, err = c.randomClient()
|
||||
if err != nil {
|
||||
return
|
||||
|
Reference in New Issue
Block a user