mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-05-20 10:20:00 +02:00
parent
2295766e2c
commit
41dfe27102
|
@ -46,8 +46,9 @@ func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server {
|
||||||
var options []grpc.ServerOption
|
var options []grpc.ServerOption
|
||||||
options = append(options,
|
options = append(options,
|
||||||
grpc.KeepaliveParams(keepalive.ServerParameters{
|
grpc.KeepaliveParams(keepalive.ServerParameters{
|
||||||
Time: 10 * time.Second, // wait time before ping if no activity
|
Time: 10 * time.Second, // wait time before ping if no activity
|
||||||
Timeout: 20 * time.Second, // ping timeout
|
Timeout: 20 * time.Second, // ping timeout
|
||||||
|
MaxConnectionAge: 10 * time.Hour,
|
||||||
}),
|
}),
|
||||||
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
|
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
|
||||||
MinTime: 60 * time.Second, // min time a client should wait before sending a ping
|
MinTime: 60 * time.Second, // min time a client should wait before sending a ping
|
||||||
|
|
Loading…
Reference in a new issue