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

Method createSession

server/mcp/handler.go:297–304  ·  view source on GitHub ↗
(userID uint)

Source from the content-addressed store, hash-verified

295}
296
297func (s *Server) createSession(userID uint) *session {
298 s.mu.Lock()
299 defer s.mu.Unlock()
300
301 now := time.Now()
302 s.pruneExpiredSessionsLocked(now)
303 return s.createSessionLocked(userID, ProtocolVersion, now)
304}
305
306func (s *Server) createSessionLocked(userID uint, protocolVersion string, now time.Time) *session {
307 s.pruneLeastRecentlyUsedUserSessionsLocked(userID, max(0, s.countUserSessionsLocked(userID)-maxUserSessions+1))

Calls 4

createSessionLockedMethod · 0.95
UnlockMethod · 0.65
NowMethod · 0.65