Skip to content

Commit 89ec9a0

Browse files
authored
Merge pull request #46 from onflow/ianthpun/grpcaccessclient-2
fix issue with overridden default options
2 parents 7c9c45c + 8c3d730 commit 89ec9a0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

gateway/grpc.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,18 @@ type GrpcGateway struct {
4545
// NewGrpcGateway returns a new gRPC gateway.
4646

4747
func NewGrpcGateway(network config.Network, opts ...grpcAccess.ClientOption) (*GrpcGateway, error) {
48-
opts = append(
49-
opts,
48+
options := append(
49+
[]grpcAccess.ClientOption{
5050
grpcAccess.WithGRPCDialOptions(
51-
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxGRPCMessageSize),
51+
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxGRPCMessageSize)),
5252
),
53-
))
53+
},
54+
opts...,
55+
)
5456

5557
gClient, err := grpcAccess.NewClient(
5658
network.Host,
57-
opts...,
59+
options...,
5860
)
5961

6062
if err != nil || gClient == nil {

0 commit comments

Comments
 (0)