()
| 48 | } |
| 49 | |
| 50 | private cleanup(): void { |
| 51 | const cutoff = Date.now() - 3_600_000; |
| 52 | for (const [id, ts] of this.attempts) { |
| 53 | const r = ts.filter((t) => t > cutoff); |
| 54 | if (r.length === 0) this.attempts.delete(id); |
| 55 | else this.attempts.set(id, r); |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // ── SessionManager ──────────────────────────────────────────────────────────── |
no test coverage detected