MCPcopy Create free account
hub / github.com/daodst/chat / Delete

Method Delete

server/sessionstore.go:89–101  ·  view source on GitHub ↗
(sid string)

Source from the content-addressed store, hash-verified

87}
88
89func (ss *SessionStore) Delete(sid string) *Session {
90 ss.rw.Lock()
91 defer ss.rw.Unlock()
92
93 if elem := ss.sessions[sid]; elem != nil {
94 ss.lru.Remove(elem)
95 delete(ss.sessions, sid)
96
97 return elem.Value.(*sessionStoreElement).val
98 }
99
100 return nil
101}
102
103func NewSessionStore(lifetime time.Duration) *SessionStore {
104 store := &SessionStore{

Callers 7

runMethod · 0.45
cleanLastSeenMethod · 0.45
cleanPresenceMethod · 0.45
readLoopMethod · 0.45
runMethod · 0.45
PerformJoinMethod · 0.45
SendFunction · 0.45

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected