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

Method countUserSessionsLocked

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

Source from the content-addressed store, hash-verified

426}
427
428func (s *Server) countUserSessionsLocked(userID uint) int {
429 count := 0
430 for _, currentSession := range s.sessions {
431 if currentSession != nil && currentSession.userID == userID {
432 count++
433 }
434 }
435 return count
436}
437
438func (s *Server) pruneLeastRecentlyUsedUserSessionsLocked(userID uint, count int) {
439 for range count {

Callers 1

createSessionLockedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected