fix gateway startup check and align loop with current tool APIs

This commit is contained in:
DBT
2026-02-23 10:23:17 +00:00
parent 0996c51978
commit 3209396568
3 changed files with 44 additions and 5 deletions

View File

@@ -231,6 +231,12 @@ func (sm *SessionManager) Save(session *Session) error {
return os.WriteFile(metaPath, data, 0644)
}
func (sm *SessionManager) Count() int {
sm.mu.RLock()
defer sm.mu.RUnlock()
return len(sm.sessions)
}
func (sm *SessionManager) loadSessions() error {
files, err := os.ReadDir(sm.storage)
if err != nil {