1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 10:17:26 +08:00

Increase session TTL to 4 hours

This commit is contained in:
Jonathan Leibiusky (@xetorthio) 2016-11-11 09:17:01 -03:00
parent 6d967441ac
commit e49245dfe9

View File

@ -59,7 +59,7 @@ func NewSession() (*Session, error) {
sessions[s.Id] = s
// Schedule cleanup of the session
time.AfterFunc(1*time.Hour, func() {
time.AfterFunc(4*time.Hour, func() {
s = GetSession(s.Id)
wsServer.BroadcastTo(s.Id, "session end")
log.Printf("Starting clean up of session [%s]\n", s.Id)