mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-28 14:47:30 +08:00
fix gateway startup check and align loop with current tool APIs
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user