[fix] 修改心跳包间隔, 避免太过频繁

This commit is contained in:
what 2023-06-09 17:01:26 +08:00
parent 070fcafd7f
commit 83343caadb

View File

@ -469,7 +469,7 @@ func NewGrpcall(addr string, protosets []string, opts ...grpc.DialOption) (g *Gr
opts = append(opts,
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 10 * time.Second, // 心跳包时间间隔
Time: 30 * time.Second, // 心跳包时间间隔
Timeout: 5 * time.Second, // 心跳包超时时间
PermitWithoutStream: true, // 允许在没有活动流时发送心跳包
}),