上传离线推送跨服集群

This commit is contained in:
liwei1dao 2022-07-22 16:36:50 +08:00
parent 999c7f3c41
commit 6052a984b0

View File

@ -64,16 +64,17 @@ func (this *AgentMgrComp) DisConnect(a IAgent) {
}, reply); err != nil {
log.Errorf("uId:%s Rpc_NoticeUserClose err:%v", a.UserId(), err)
}
//推送跨服集群处理
if _, err := this.service.AcrossClusterRpcGo(context.Background(), this.options.SpanServiceTag, comm.Service_Worker, string(comm.Rpc_GatewayNoticeUserClose), &pb.NoticeUserCloseReq{
Ip: a.IP(),
ServiceTag: this.service.GetTag(),
GatewayServiceId: this.service.GetId(),
UserSessionId: a.SessionId(),
UserId: a.UserId(),
}, reply); err != nil {
log.Errorf("uId:%s Rpc_NoticeUserClose err:%v", a.UserId(), err)
if this.options.SpanServiceTag != "" {
//推送跨服集群处理
if _, err := this.service.AcrossClusterRpcGo(context.Background(), this.options.SpanServiceTag, comm.Service_Worker, string(comm.Rpc_GatewayNoticeUserClose), &pb.NoticeUserCloseReq{
Ip: a.IP(),
ServiceTag: this.service.GetTag(),
GatewayServiceId: this.service.GetId(),
UserSessionId: a.SessionId(),
UserId: a.UserId(),
}, reply); err != nil {
log.Errorf("uId:%s Rpc_NoticeUserClose err:%v", a.UserId(), err)
}
}
}
}