From caf3e2734d9f28a2dc04b2578d9fbe00336682d8 Mon Sep 17 00:00:00 2001 From: Y Yang Date: Tue, 18 Aug 2020 14:02:46 +0800 Subject: [PATCH] fix invalid endpoint no return error pass "grpc.WithBlock()" to block until the underlying connection is up. --- sd/etcdv3/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sd/etcdv3/client.go b/sd/etcdv3/client.go index ffc86fef9..ee02f3edf 100644 --- a/sd/etcdv3/client.go +++ b/sd/etcdv3/client.go @@ -110,6 +110,7 @@ func NewClient(ctx context.Context, machines []string, options ClientOptions) (C TLS: tlscfg, Username: options.Username, Password: options.Password, + DialOptions: []grpc.DialOption{grpc.WithBlock()}, }) if err != nil { return nil, err