mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 03:21:29 +00:00
fix #117
This commit is contained in:
parent
485d89d5c8
commit
c83d03c298
@ -113,8 +113,8 @@ func (pder *MemProvider) SessionGC() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (pder *MemProvider) SessionUpdate(sid string) error {
|
func (pder *MemProvider) SessionUpdate(sid string) error {
|
||||||
pder.lock.RLock()
|
pder.lock.Lock()
|
||||||
defer pder.lock.RUnlock()
|
defer pder.lock.Unlock()
|
||||||
if element, ok := pder.sessions[sid]; ok {
|
if element, ok := pder.sessions[sid]; ok {
|
||||||
element.Value.(*MemSessionStore).timeAccessed = time.Now()
|
element.Value.(*MemSessionStore).timeAccessed = time.Now()
|
||||||
pder.list.MoveToFront(element)
|
pder.list.MoveToFront(element)
|
||||||
|
Loading…
Reference in New Issue
Block a user