(id string)
| 355 | } |
| 356 | |
| 357 | func (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 | |
| 374 | func (s *Server) sessionInitialized(id string) bool { |
| 375 | s.mu.Lock() |
no test coverage detected