File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "time"
1212
1313 "github.com/hyperledger-labs/fabric-smart-client/pkg/utils/errors"
14+ grpc2 "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/grpc"
1415 "google.golang.org/grpc"
1516 "google.golang.org/grpc/backoff"
1617 "google.golang.org/grpc/credentials"
@@ -36,6 +37,11 @@ func GrpcClient(c *Config) (*grpc.ClientConn, error) {
3637 var opts []grpc.DialOption
3738 opts = append (opts , WithConnectionTime (endpoint .ConnectionTimeout ))
3839 opts = append (opts , WithTLS (endpoint ))
40+ opts = append (opts , grpc2 .ClientKeepaliveOptions (
41+ grpc2.KeepaliveOptions {
42+ ClientInterval : 5 * time .Minute ,
43+ ClientTimeout : 6 * time .Minute ,
44+ })... )
3945
4046 return grpc .NewClient (endpoint .Address , opts ... )
4147}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ func GrpcClient(c *Config) (*grpc.ClientConn, error) {
3939 opts = append (opts , WithTLS (endpoint ))
4040 opts = append (opts , grpc2 .ClientKeepaliveOptions (
4141 grpc2.KeepaliveOptions {
42- ClientInterval : 60 * time .Second ,
42+ ClientInterval : 120 * time .Second ,
4343 ClientTimeout : 600 * time .Second ,
4444 })... )
4545
You can’t perform that action at this time.
0 commit comments