From e673ae3e7682f48d9605e025f2697c35ae94f685 Mon Sep 17 00:00:00 2001 From: epi <43392618+epi052@users.noreply.github.com> Date: Sat, 15 Nov 2025 21:56:09 -0500 Subject: [PATCH] added new flag releases before returns from should_enforce_policy --- src/scanner/requester.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scanner/requester.rs b/src/scanner/requester.rs index 8ae04b5..52ca93d 100644 --- a/src/scanner/requester.rs +++ b/src/scanner/requester.rs @@ -188,8 +188,10 @@ impl Requester { let requests = atomic_load!(self.handles.stats.data.requests); if requests < max(self.handles.config.threads, 50) { - // check whether at least a full round of threads has made requests or 50 (default # of - // threads), whichever is higher + // check whether at least a full round of threads has made requests or 50 + // (default # of threads), whichever is higher + // need to reset the flag since we're not actually enforcing + atomic_store!(self.policy_data.cooling_down, false, Ordering::Release); return None; } @@ -205,6 +207,8 @@ impl Requester { return Some(PolicyTrigger::Status429); } + // No policy trigger found, reset the flag + atomic_store!(self.policy_data.cooling_down, false, Ordering::Release); None }