Skip to content

Commit c320e03

Browse files
committed
[coconut] Set maximum incoming gRPC payload size to 10MB
1 parent 030958a commit c320e03

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

coconut/client.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@ import (
3535

3636
var log = logger.New(logrus.StandardLogger(), "coconut")
3737

38+
const GrpcMaxCallRecvSize = 10*1024*1024
3839
type internalState struct {
39-
4040
}
4141

4242
func NewClient(cxt context.Context, cancel context.CancelFunc, endpoint string) *RpcClient {
43-
conn, err := grpc.DialContext(cxt, endpoint, grpc.WithInsecure())
43+
conn, err := grpc.DialContext(
44+
cxt,
45+
endpoint,
46+
grpc.WithInsecure(),
47+
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(GrpcMaxCallRecvSize)),
48+
)
4449
if err != nil {
4550
log.WithField("error", err.Error()).
4651
WithField("endpoint", endpoint).

0 commit comments

Comments
 (0)