Do session disk writes in a new goroutine
This commit is contained in:
parent
e0200a2b2a
commit
e8f5809940
@ -293,7 +293,7 @@ func (s *stateStore) setSession(session *session.Session) {
|
|||||||
s.lock.Lock()
|
s.lock.Lock()
|
||||||
s.sessions[session.Key()] = session
|
s.sessions[session.Key()] = session
|
||||||
s.lock.Unlock()
|
s.lock.Unlock()
|
||||||
s.sessionStore.SaveSession(session)
|
go s.sessionStore.SaveSession(session)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *stateStore) deleteSession(key string) {
|
func (s *stateStore) deleteSession(key string) {
|
||||||
@ -319,5 +319,5 @@ func (s *stateStore) deleteSession(key string) {
|
|||||||
state.user.Remove()
|
state.user.Remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
s.sessionStore.DeleteSession(key)
|
go s.sessionStore.DeleteSession(key)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user