Browse Source

Handle ReplicaNotAvailable like LeaderNotAvailable when initializing a client

Willem van Bergen 11 years ago
parent
commit
9170d319e4
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 {
 	case nil:
 		break
-	case LeaderNotAvailable:
+	case LeaderNotAvailable, ReplicaNotAvailable:
 		// indicates that maybe part of the cluster is down, but is not fatal to creating the client
 		Logger.Println(err)
 	default: