Explorar o código

client: don't abort creation on auth failure

The client can still be useful for some tasks even if it can't maintain a
complete list of topics due to e.g. Kafka 0.10's new ACLs.

Fixes #722.
Evan Huus %!s(int64=9) %!d(string=hai) anos
pai
achega
f4a626377c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      client.go

+ 1 - 1
client.go

@@ -138,7 +138,7 @@ func NewClient(addrs []string, conf *Config) (Client, error) {
 	switch err {
 	case nil:
 		break
-	case ErrLeaderNotAvailable, ErrReplicaNotAvailable:
+	case ErrLeaderNotAvailable, ErrReplicaNotAvailable, ErrTopicAuthorizationFailed, ErrClusterAuthorizationFailed:
 		// indicates that maybe part of the cluster is down, but is not fatal to creating the client
 		Logger.Println(err)
 	default: