Browse Source

Merge pull request #262 from Shopify/handle_replica_not_vailable

Handle ReplicaNotAvailable like LeaderNotAvailable when initializing a client
Willem van Bergen 11 years ago
parent
commit
f25253e26a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client.go

+ 1 - 1
client.go

@@ -70,7 +70,7 @@ func NewClient(id string, addrs []string, config *ClientConfig) (*Client, error)
 	switch err {
 	switch err {
 	case nil:
 	case nil:
 		break
 		break
-	case LeaderNotAvailable:
+	case LeaderNotAvailable, ReplicaNotAvailable:
 		// indicates that maybe part of the cluster is down, but is not fatal to creating the client
 		// indicates that maybe part of the cluster is down, but is not fatal to creating the client
 		Logger.Println(err)
 		Logger.Println(err)
 	default:
 	default: