Skip to content

Commit

Permalink
Merge pull request #46 from onflow/ianthpun/grpcaccessclient-2
Browse files Browse the repository at this point in the history
fix issue with overridden default options
  • Loading branch information
ianthpun authored May 7, 2024
2 parents 7c9c45c + 8c3d730 commit 89ec9a0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions gateway/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ type GrpcGateway struct {
// NewGrpcGateway returns a new gRPC gateway.

func NewGrpcGateway(network config.Network, opts ...grpcAccess.ClientOption) (*GrpcGateway, error) {
opts = append(
opts,
options := append(
[]grpcAccess.ClientOption{
grpcAccess.WithGRPCDialOptions(
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxGRPCMessageSize),
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxGRPCMessageSize)),
),
))
},
opts...,
)

gClient, err := grpcAccess.NewClient(
network.Host,
opts...,
options...,
)

if err != nil || gClient == nil {
Expand Down

0 comments on commit 89ec9a0

Please sign in to comment.