limit send/recv msg size for streams too
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
0fae2e1bdd
commit
db02559a00
7
grpc.go
7
grpc.go
@ -186,8 +186,15 @@ func (g *grpcClient) stream(ctx context.Context, addr string, req client.Request
|
|||||||
|
|
||||||
wc := &wrapMicroCodec{cf}
|
wc := &wrapMicroCodec{cf}
|
||||||
|
|
||||||
|
maxRecvMsgSize := g.maxRecvMsgSizeValue()
|
||||||
|
maxSendMsgSize := g.maxSendMsgSizeValue()
|
||||||
|
|
||||||
grpcDialOptions := []grpc.DialOption{
|
grpcDialOptions := []grpc.DialOption{
|
||||||
g.secure(addr),
|
g.secure(addr),
|
||||||
|
grpc.WithDefaultCallOptions(
|
||||||
|
grpc.MaxCallRecvMsgSize(maxRecvMsgSize),
|
||||||
|
grpc.MaxCallSendMsgSize(maxSendMsgSize),
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts := g.getGrpcDialOptions(); opts != nil {
|
if opts := g.getGrpcDialOptions(); opts != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user