Skip to content

Commit 5d26f3f

Browse files
authored
Merge pull request lightninglabs#68 from ellemouton/hashmailKeepalivePing
aperture: hashmail keepalive enforcement policy
2 parents 41336ba + ffeafa4 commit 5d26f3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

aperture.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
"golang.org/x/net/http2/h2c"
3636
"google.golang.org/grpc"
3737
"google.golang.org/grpc/credentials"
38+
"google.golang.org/grpc/keepalive"
3839
"google.golang.org/protobuf/encoding/protojson"
3940
"gopkg.in/yaml.v2"
4041
)
@@ -695,6 +696,9 @@ func createHashMailServer(cfg *Config) ([]proxy.LocalService, func(), error) {
695696
grpc.ChainStreamInterceptor(
696697
grpc_prometheus.StreamServerInterceptor,
697698
),
699+
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
700+
MinTime: time.Minute,
701+
}),
698702
}
699703

700704
// Create a gRPC server for the hashmail server.

0 commit comments

Comments
 (0)