* Start automatic cleanup of stale sessions
()
| 134 | * Start automatic cleanup of stale sessions |
| 135 | */ |
| 136 | private startAutoCleanup(): void { |
| 137 | if (this.cleanupInterval) { |
| 138 | return; |
| 139 | } |
| 140 | |
| 141 | // Run cleanup every 5 minutes |
| 142 | this.cleanupInterval = setInterval(() => { |
| 143 | this.cleanupStaleSessions(); |
| 144 | }, 5 * 60 * 1000); |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Clean up sessions that haven't been active for 1 hour |
no test coverage detected