Merge pull request #68 from ellemouton/hashmailKeepalivePing

aperture: hashmail keepalive enforcement policy
This commit is contained in:
Oliver Gugger
2022-02-08 11:57:05 +01:00
committed by GitHub

View File

@@ -35,6 +35,7 @@ import (
"golang.org/x/net/http2/h2c"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/keepalive"
"google.golang.org/protobuf/encoding/protojson"
"gopkg.in/yaml.v2"
)
@@ -695,6 +696,9 @@ func createHashMailServer(cfg *Config) ([]proxy.LocalService, func(), error) {
grpc.ChainStreamInterceptor(
grpc_prometheus.StreamServerInterceptor,
),
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
MinTime: time.Minute,
}),
}
// Create a gRPC server for the hashmail server.