fix: track and clear all intervals and event listeners
- FightPage.vue: store SSE listener refs in array, removeEventListener on each before close() in disconnectSSE() - FightScene.ts: add cleanupTimers Set with trackedInterval/trackedTimeout helpers; replace key setInterval calls (projectile trails, entrance flames, talking animation, exhaust effects, dimensional shift, hole fade) with tracked versions; clear all on scene destroy() - rate-limit.ts: export cleanupInterval handle for graceful shutdown Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
010e18fbd3
commit
7bd110684d
@@ -5,7 +5,7 @@ const isDev = process.env.NODE_ENV !== 'production'
|
||||
const hitCounts = new Map<string, { count: number; resetAt: number }>()
|
||||
|
||||
// Cleanup stale entries every 5 minutes
|
||||
setInterval(() => {
|
||||
export const cleanupInterval = setInterval(() => {
|
||||
const now = Date.now()
|
||||
for (const [key, entry] of hitCounts) {
|
||||
if (now > entry.resetAt) hitCounts.delete(key)
|
||||
|
||||
Reference in New Issue
Block a user