Browse Source

add WaitForReady to grpc DialOption

pull/1577/head
Konstantin Lebedev 4 years ago
parent
commit
918546bbdb
  1. 1
      weed/pb/grpc_client_server.go

1
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

Loading…
Cancel
Save