Browse Source

revert this grpc related change

maybe related to https://github.com/chrislusf/seaweedfs/issues/1277
pull/1293/head
Chris Lu 5 years ago
parent
commit
978da73cdb
  1. 4
      weed/pb/grpc_client_server.go

4
weed/pb/grpc_client_server.go

@ -40,7 +40,7 @@ func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server {
}), }),
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
PermitWithoutStream: true,
PermitWithoutStream: false,
}), }),
grpc.MaxRecvMsgSize(Max_Message_Size), grpc.MaxRecvMsgSize(Max_Message_Size),
grpc.MaxSendMsgSize(Max_Message_Size), grpc.MaxSendMsgSize(Max_Message_Size),
@ -66,7 +66,7 @@ func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*gr
grpc.WithKeepaliveParams(keepalive.ClientParameters{ grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 30 * time.Second, // client ping server if no activity for this long Time: 30 * time.Second, // client ping server if no activity for this long
Timeout: 20 * time.Second, Timeout: 20 * time.Second,
PermitWithoutStream: true,
PermitWithoutStream: false,
})) }))
for _, opt := range opts { for _, opt := range opts {
if opt != nil { if opt != nil {

Loading…
Cancel
Save