From 04b6c9d3add890070824d840a1654f1bca5bd096 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Wed, 6 Apr 2016 13:13:03 +0300 Subject: [PATCH] Improve comment. --- cluster.go | 5 +++-- internal/pool/pool.go | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cluster.go b/cluster.go index a31559b..29b0cfb 100644 --- a/cluster.go +++ b/cluster.go @@ -324,8 +324,9 @@ type ClusterOptions struct { // A seed list of host:port addresses of cluster nodes. Addrs []string - // The maximum number of MOVED/ASK redirects to follow before giving up. - // Default is 16 + // The maximum number of retries before giving up. Command is retried + // on network errors and MOVED/ASK redirects. + // Default is 16. MaxRedirects int // Following options are copied from Options struct. diff --git a/internal/pool/pool.go b/internal/pool/pool.go index 10155f3..700e660 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -18,9 +18,7 @@ var Logger = log.New(ioutil.Discard, "redis: ", log.LstdFlags) var ( ErrClosed = errors.New("redis: client is closed") ErrPoolTimeout = errors.New("redis: connection pool timeout") - - errConnClosed = errors.New("connection is closed") - errConnStale = errors.New("connection is stale") + errConnStale = errors.New("connection is stale") ) var timers = sync.Pool{