diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-12-22 23:00:55 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-12-22 23:00:55 (GMT) |
commit | 87767fb705b253dffb2d88b44ae082302935bd0e (patch) | |
tree | bfd8e517cccbebd9ef2f5a604f904759f4075849 /session_store.go | |
parent | 5ef7fd6e20f360ff370a5e7e082b5d004c599fdc (diff) |
sessions now call remove when done
Diffstat (limited to 'session_store.go')
-rw-r--r-- | session_store.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/session_store.go b/session_store.go index 8dd74c7..505bd75 100644 --- a/session_store.go +++ b/session_store.go @@ -84,7 +84,7 @@ func (self *SessionStore) new(ctx *ImportContext) (resp newSessionResponse) { if _, exists := self.store[ctx.UserName]; !exists { self.store[ctx.UserName] = make(map[string]*Session) } - self.store[ctx.UserName][resp.id] = NewSession(ctx) + self.store[ctx.UserName][resp.id] = NewSession(ctx, func() { self.GetInterface().Remove(ctx.UserName, resp.id) }) resp.session = self.store[ctx.UserName][resp.id].getInterface() rhdl.Printf("SessionStore: created session for '%s' -> %s", ctx.UserName, resp.id) return @@ -197,9 +197,9 @@ func NewSessionStore(conf *Config) (store *SessionStore, err error) { store.quit = make(chan bool) store.done = make(chan bool) store.store = make(map[string]map[string]*Session) - store.newChan = make(chan newSessionRequest) - store.getChan = make(chan getSessionRequest) - store.removeChan = make(chan removeSessionRequest) + store.newChan = make(chan newSessionRequest, 10) + store.getChan = make(chan getSessionRequest, 10) + store.removeChan = make(chan removeSessionRequest, 10) go store.dispatchRequests() return |