Skip to content

Commit

Permalink
Bubbling up the same error that redigo uses so that the logic to shor…
Browse files Browse the repository at this point in the history
…t circuit cache is consistent when using cluster mode
  • Loading branch information
MMartyn committed May 19, 2023
1 parent 0ef9ccf commit f896d5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (r *redisC) doCmd(cmd string, args ...interface{}) (interface{}, error) {
defer r.conf.TimeTracker(commandKpiName(cmd), time.Now())
result, err := r.cluster.Do(context.Background(), append([]interface{}{cmd}, args...)...).Result()
if err == redisCluster.Nil {
return result, nil
return result, redis.ErrNil
}

return result, err
Expand Down

0 comments on commit f896d5e

Please sign in to comment.