1
0
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:
Vladimir Mihailenco
2016-03-19 16:33:14 +02:00
parent d2ae7d8707
commit 30ce5ebd57
3 changed files with 20 additions and 18 deletions

View File

@@ -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