MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / sessionInitialized

Method sessionInitialized

server/mcp/handler.go:374–388  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

372}
373
374func (s *Server) sessionInitialized(id string) bool {
375 s.mu.Lock()
376 defer s.mu.Unlock()
377 currentSession, ok := s.sessions[id]
378 if !ok || currentSession == nil {
379 return false
380 }
381 now := time.Now()
382 if sessionExpired(currentSession, now) {
383 delete(s.sessions, id)
384 return false
385 }
386 currentSession.lastUsedAt = now
387 return currentSession.initialized
388}
389
390func (s *Server) deleteSession(id string) {
391 s.mu.Lock()

Callers 1

handlePostMethod · 0.95

Calls 3

sessionExpiredFunction · 0.85
UnlockMethod · 0.65
NowMethod · 0.65

Tested by

no test coverage detected