Improve session privacy handling and cleanup logic
Rust / build (push) Canceled after 0s

This commit is contained in:
thakares committed 2026-05-23 15:57:34 +05:30
1 parent 0b43530651
commit 217dc5f92b
4 files changed
+15 -26

No files matched your search

+1 -7
View File
@@ -20,13 +20,7 @@ pub async fn cleanup_loop(state: Arc<AppState>) {
// Evict stale rate-limiter entries to prevent unbounded HashMap growth.
{
let window_secs = {
if let Ok(config) = state.config.read() {
config.rate_limit_window_secs
} else {
10 // fallback default
}
};
let window_secs = state.get_config().rate_limit_window_secs;
let mut rl = state.rate_limiter.lock().await;
rl.evict_stale(window_secs);
}