summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimport/session_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/helsinki.at/rhimport/session_store.go')
-rw-r--r--src/helsinki.at/rhimport/session_store.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helsinki.at/rhimport/session_store.go b/src/helsinki.at/rhimport/session_store.go
index 8dd74c7..505bd75 100644
--- a/src/helsinki.at/rhimport/session_store.go
+++ b/src/helsinki.at/rhimport/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