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

Method markSessionInitialized

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

Source from the content-addressed store, hash-verified

355}
356
357func (s *Server) markSessionInitialized(id string) bool {
358 s.mu.Lock()
359 defer s.mu.Unlock()
360 currentSession, ok := s.sessions[id]
361 if !ok || currentSession == nil {
362 return false
363 }
364 now := time.Now()
365 if sessionExpired(currentSession, now) {
366 delete(s.sessions, id)
367 return false
368 }
369 currentSession.initialized = true
370 currentSession.lastUsedAt = now
371 return true
372}
373
374func (s *Server) sessionInitialized(id string) bool {
375 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