update Session
This commit is contained in:
parent
97ea52b9e4
commit
cf5d2991d7
@ -155,6 +155,7 @@ func (this *User) ResetSession() {
|
|||||||
for _, v := range us {
|
for _, v := range us {
|
||||||
this.modelSession.DelListlds(comm.RDS_EMPTY, []string{v.Uid})
|
this.modelSession.DelListlds(comm.RDS_EMPTY, []string{v.Uid})
|
||||||
}
|
}
|
||||||
|
this.modelSession.Del(comm.RDS_EMPTY)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清除session
|
// 清除session
|
||||||
@ -162,7 +163,6 @@ func (this *User) CleanSession(session comm.IUserSession) {
|
|||||||
this.stopTicker(session.GetUserId())
|
this.stopTicker(session.GetUserId())
|
||||||
if !this.IsCross() {
|
if !this.IsCross() {
|
||||||
this.modelUser.updateOfflineTime(session.GetUserId())
|
this.modelUser.updateOfflineTime(session.GetUserId())
|
||||||
|
|
||||||
}
|
}
|
||||||
// sId := fmt.Sprintf("%s-%s", comm.RDS_EMPTY, session.GetUserId())
|
// sId := fmt.Sprintf("%s-%s", comm.RDS_EMPTY, session.GetUserId())
|
||||||
// this.modelSession.Del(sId, db.SetDBMgoLog(false))
|
// this.modelSession.Del(sId, db.SetDBMgoLog(false))
|
||||||
@ -170,6 +170,7 @@ func (this *User) CleanSession(session comm.IUserSession) {
|
|||||||
//确保删除的会话是目标会话 不是就不要删除了
|
//确保删除的会话是目标会话 不是就不要删除了
|
||||||
if user := this.modelSession.getUserSession(session.GetUserId()); user != nil && user.SessionId == session.GetSessionId() {
|
if user := this.modelSession.getUserSession(session.GetUserId()); user != nil && user.SessionId == session.GetSessionId() {
|
||||||
this.modelSession.Del(session.GetUserId(), db.SetDBMgoLog(false))
|
this.modelSession.Del(session.GetUserId(), db.SetDBMgoLog(false))
|
||||||
|
this.modelSession.DelListlds(comm.RDS_EMPTY, []string{session.GetUserId()}, db.SetDBMgoLog(false))
|
||||||
}
|
}
|
||||||
this.modelUser.DelByUId(session.GetUserId(), db.SetDBMgoLog(false))
|
this.modelUser.DelByUId(session.GetUserId(), db.SetDBMgoLog(false))
|
||||||
this.modelExpand.DelByUId(session.GetUserId(), db.SetDBMgoLog(false))
|
this.modelExpand.DelByUId(session.GetUserId(), db.SetDBMgoLog(false))
|
||||||
|
Loading…
Reference in New Issue
Block a user