mirror of
https://github.com/lightninglabs/aperture.git
synced 2026-01-17 00:04:24 +01:00
Merge pull request #68 from ellemouton/hashmailKeepalivePing
aperture: hashmail keepalive enforcement policy
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user