MCPcopy Create free account
hub / github.com/codeaashu/claude-code / cleanup

Method cleanup

src/server/web/auth.ts:54–64  ·  view source on GitHub ↗

* Periodically clean up stale entries.

()

Source from the content-addressed store, hash-verified

52 * Periodically clean up stale entries.
53 */
54 cleanup(): void {
55 const now = Date.now();
56 for (const [ip, timestamps] of this.attempts) {
57 const recent = timestamps.filter((t) => now - t < this.windowMs);
58 if (recent.length === 0) {
59 this.attempts.delete(ip);
60 } else {
61 this.attempts.set(ip, recent);
62 }
63 }
64 }
65}

Callers

nothing calls this directly

Calls 2

deleteMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected