diff options
| author | chrislu <chris.lu@gmail.com> | 2022-01-27 02:28:22 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-01-27 02:28:22 -0800 |
| commit | b9b684194f8269325ec9c1666c7202a6f4dabe15 (patch) | |
| tree | de830aa7dec5c40dd8021499af13e73e6d4920a0 | |
| parent | 62d815d1ca9e6c40b3485cae151932be57f2006d (diff) | |
| download | seaweedfs-b9b684194f8269325ec9c1666c7202a6f4dabe15.tar.xz seaweedfs-b9b684194f8269325ec9c1666c7202a6f4dabe15.zip | |
remove max connection age
following https://github.com/grpc/grpc-go/issues/3170#issuecomment-552517779
| -rw-r--r-- | weed/pb/grpc_client_server.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/pb/grpc_client_server.go b/weed/pb/grpc_client_server.go index 532c66932..cedcc2813 100644 --- a/weed/pb/grpc_client_server.go +++ b/weed/pb/grpc_client_server.go @@ -45,9 +45,8 @@ func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server { var options []grpc.ServerOption options = append(options, grpc.KeepaliveParams(keepalive.ServerParameters{ - Time: 10 * time.Second, // wait time before ping if no activity - Timeout: 20 * time.Second, // ping timeout - MaxConnectionAge: 10 * time.Hour, + Time: 10 * time.Second, // wait time before ping if no activity + Timeout: 20 * time.Second, // ping timeout }), grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ MinTime: 60 * time.Second, // min time a client should wait before sending a ping |
