diff --git a/comm/const.go b/comm/const.go index c362064c0..cd50fa6b2 100644 --- a/comm/const.go +++ b/comm/const.go @@ -17,7 +17,7 @@ const ( const ( Service_Gateway = "gateway" Service_Worker = "worker" - Service_DB = "dbservice" + Service_Mainte = "mainte" ) //ERR diff --git a/modules/gateway/agentmgr_comp.go b/modules/gateway/agentmgr_comp.go index a36c5bf0f..4815168de 100644 --- a/modules/gateway/agentmgr_comp.go +++ b/modules/gateway/agentmgr_comp.go @@ -53,6 +53,18 @@ func (this *AgentMgrComp) DisConnect(a IAgent) { }, reply); err != nil { log.Errorf("uId:%s Rpc_NoticeUserClose err:%v", a.UserId(), err) } + + //通知运维服务器 处理用户离线数据同步 + if _, err := this.service.RpcGo(context.Background(), comm.Service_Mainte, 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 _, err := this.service.AcrossClusterRpcGo(context.Background(), this.options.SpanServiceTag, comm.Service_Worker, string(comm.Rpc_GatewayNoticeUserClose), &pb.NoticeUserCloseReq{ Ip: a.IP(),