limit send/recv msg size for streams too

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-06-05 16:24:29 +03:00
parent 0fae2e1bdd
commit db02559a00

View File

@ -186,8 +186,15 @@ func (g *grpcClient) stream(ctx context.Context, addr string, req client.Request
wc := &wrapMicroCodec{cf}
maxRecvMsgSize := g.maxRecvMsgSizeValue()
maxSendMsgSize := g.maxSendMsgSizeValue()
grpcDialOptions := []grpc.DialOption{
g.secure(addr),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(maxRecvMsgSize),
grpc.MaxCallSendMsgSize(maxSendMsgSize),
),
}
if opts := g.getGrpcDialOptions(); opts != nil {