回收session

This commit is contained in:
meixiongfeng 2023-06-30 14:47:02 +08:00
parent 32701a664c
commit a9a6325ccb

View File

@ -146,6 +146,12 @@ func (this *ModuleSys) CheckOpenCondCfgById(uid string, id string) (bOpen bool,
func (this *ModuleSys) OpenCond(ctx context.Context, req *pb.RPCFriendNumReq, resp interface{}) (err error) {
if session, ok := this.GetUserSession(req.Uid); ok {
this.AutoActivate(session, req.Cond)
if err = session.Push(); err != nil {
this.Errorln(err)
}
this.PutUserSession(session)
} else {
this.PutUserSession(session)
}
return