Commit 23f9687a authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Support updating session state

parent d2d56c51
......@@ -115,6 +115,7 @@ func HandleProtocolMessage(
session.returned = true
result = session.result
}
sessions.update(token, session)
}()
// Route to handler
......
......@@ -30,6 +30,7 @@ type session struct {
type sessionStore interface {
get(token string) *session
add(token string, session *session)
update(token string, session *session)
deleteExpired()
}
......@@ -70,6 +71,10 @@ func (s *memorySessionStore) add(token string, session *session) {
s.m[token] = session
}
func (s *memorySessionStore) update(token string, session *session) {
// nop
}
func (s memorySessionStore) deleteExpired() {
// First check which sessions have expired
// We don't need a write lock for this yet, so postpone that for actual deleting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment