Explorar o código

Handle ReplicaNotAvailable like LeaderNotAvailable when initializing a client

Willem van Bergen %!s(int64=11) %!d(string=hai) anos
pai
achega
9170d319e4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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: