diff --git a/server/statserver/session/sessionmgr.go b/server/statserver/session/sessionmgr.go index 5d463e40..7c80367d 100644 --- a/server/statserver/session/sessionmgr.go +++ b/server/statserver/session/sessionmgr.go @@ -3,6 +3,7 @@ package session import ( "q5" "f5" + "time" "sync" ) @@ -27,6 +28,7 @@ func (this *sessionMgr) Init() { this, 60, 10000) + go this.updateTimer() } func (this *sessionMgr) UnInit() { @@ -61,3 +63,12 @@ func (this *sessionMgr) getSession(accountId string) *userSession { return nil } } + +func (this *sessionMgr) updateTimer() { + for true { + this.lock.Lock() + this.timer.Update() + this.lock.Unlock() + time.Sleep(1 * time.Second); + } +}