up(agent): 不间断上报信息为报警作准备

This commit is contained in:
naiba
2020-12-19 23:27:59 +08:00
parent fcbd564bff
commit ad4fedaa9b
7 changed files with 20 additions and 65 deletions

View File

@@ -38,13 +38,6 @@ func (s *NezhaHandler) Heartbeat(r *pb.Beat, stream pb.NezhaService_HeartbeatSer
if clientID, err = s.Auth.Check(stream.Context()); err != nil {
return err
}
// 默认连接后先上报10分钟
err = stream.Send(&pb.Command{
Type: model.MTReportState,
})
if err != nil {
return err
}
// 放入在线服务器列表
dao.ServerLock.RLock()
closeCh := make(chan error)