diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-02-26 16:51:38 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-02-26 16:51:38 -0800 |
| commit | 37a3628b2e9dbd5149060f8688b34182b2d66f6c (patch) | |
| tree | f767df85ab9deb4b7dd05781ba830b22512379c6 | |
| parent | f69a1694e73bb2e24e4c0b0160bce6c133a7d0f8 (diff) | |
| download | seaweedfs-37a3628b2e9dbd5149060f8688b34182b2d66f6c.tar.xz seaweedfs-37a3628b2e9dbd5149060f8688b34182b2d66f6c.zip | |
grpc add PermitWithoutStream to client and server options
| -rw-r--r-- | weed/util/grpc_client_server.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/util/grpc_client_server.go b/weed/util/grpc_client_server.go index 4dace5e8b..dc896ccb4 100644 --- a/weed/util/grpc_client_server.go +++ b/weed/util/grpc_client_server.go @@ -30,6 +30,7 @@ func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server { Timeout: 20 * time.Second, // ping timeout }), grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ MinTime: 60 * time.Second, // min time a client should wait before sending a ping + PermitWithoutStream: true, })) for _, opt := range opts { if opt != nil { @@ -48,6 +49,7 @@ func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*gr grpc.WithKeepaliveParams(keepalive.ClientParameters{ Time: 30 * time.Second, // client ping server if no activity for this long Timeout: 20 * time.Second, + PermitWithoutStream: true, })) for _, opt := range opts { if opt != nil { |
