Corrected an unwanted mutex copy in 5-session-cleaner

main
oabrivard 2 years ago
parent 124e66798a
commit ac5b2fb73a

@ -35,7 +35,7 @@ type SessionManager struct {
type Session struct {
Data map[string]interface{}
timer *time.Timer
mu sync.Mutex
mu *sync.Mutex
}
// NewSessionManager creates a new sessionManager
@ -66,6 +66,7 @@ func (m *SessionManager) CreateSession() (string, error) {
timer: time.AfterFunc(5*time.Second, func() {
m.CleanSession(sessionID)
}),
mu: &sync.Mutex{},
}
m.rwmu.Unlock()

Loading…
Cancel
Save