From 6c96dd634499648b7f58e93abce7f9696e3fc9a7 Mon Sep 17 00:00:00 2001 From: Timo <6156589+Shik3i@users.noreply.github.com> Date: Tue, 16 Jun 2026 13:10:37 +0200 Subject: [PATCH] chore(refactor): remove orphaned comment, add double-start guard to rate-limiter --- extension/background.js | 2 -- server/rate-limiter.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/extension/background.js b/extension/background.js index 44dfe5a..6e13bf8 100644 --- a/extension/background.js +++ b/extension/background.js @@ -192,8 +192,6 @@ let forceSyncTimeout = null; let episodeLobby = null; // { expectedTitle, initiatorPeerId, readyPeers: [], createdAt } let episodeLobbyTimeout = null; -// --- Episode Title Extraction (synced with content.js via episode-utils.js) --- - // --- Storage Utils --- /** diff --git a/server/rate-limiter.js b/server/rate-limiter.js index fc39891..be0662c 100644 --- a/server/rate-limiter.js +++ b/server/rate-limiter.js @@ -115,6 +115,7 @@ export function checkAdminMetricsAuthRate(ip) { } export function startRateLimitCleanup(io) { + if (authCleanupId !== null || rateLimitCleanupId !== null) return; // guard double-start // Clean up old auth failure records (every 15 minutes) authCleanupId = setInterval(() => { const now = Date.now();