mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-26 12:08:15 +00:00
chore(refactor): remove orphaned comment, add double-start guard to rate-limiter
This commit is contained in:
@@ -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 ---
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user