|
@@ -249,7 +249,7 @@ func RpcCall(address, serviceMethod string, args any, reply any) error {
|
|
|
func GrpcCall(address string, timeout int64) (pb.ServiceClient, context.Context, func(), error) {
|
|
|
var err error
|
|
|
GrpcCoonOnce.Do(func() {
|
|
|
- GrpcCoon, err = grpc.Dial(address, grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
|
|
+ GrpcCoon, err = grpc.Dial(address, grpc.WithInsecure(), grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
|
|
Time: 10 * time.Second, // 发送ping的间隔
|
|
|
Timeout: 5 * time.Second, // 等待pong响应的超时时间
|
|
|
PermitWithoutStream: true, // 是否在没有活跃流的情况下发送pings
|