From 918546bbdb2054fbe8c0016c757fc73d03758fcd Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev Date: Thu, 29 Oct 2020 08:29:04 +0500 Subject: [PATCH] add WaitForReady to grpc DialOption --- weed/pb/grpc_client_server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/weed/pb/grpc_client_server.go b/weed/pb/grpc_client_server.go index ce706e282..f19af43b2 100644 --- a/weed/pb/grpc_client_server.go +++ b/weed/pb/grpc_client_server.go @@ -62,6 +62,7 @@ func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*gr grpc.WithDefaultCallOptions( grpc.MaxCallSendMsgSize(Max_Message_Size), grpc.MaxCallRecvMsgSize(Max_Message_Size), + grpc.WaitForReady(true), ), grpc.WithKeepaliveParams(keepalive.ClientParameters{ Time: 30 * time.Second, // client ping server if no activity for this long