From eaf042e6b74b0283aea205765992344d45068b7c Mon Sep 17 00:00:00 2001 From: Droid Date: Wed, 21 Jan 2026 15:27:41 +0400 Subject: [PATCH] fix: enforce minimum debounce of 10ms to prevent CPU exhaustion --- src/config.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config.rs b/src/config.rs index 6e9bddf..a2373d9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -384,6 +384,9 @@ impl Config { } pub fn set_watch_debounce(&mut self, ms: u64) -> Result<()> { + if ms < 10 { + anyhow::bail!("Watch debounce must be at least 10ms"); + } self.watch_debounce_ms = ms; self.save() }