Fix stale warmup status persisting after rules are removed from config

spawn_warmup() returned early when rules were empty without clearing
status.warmup, leaving orphaned entries visible in web UI and CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
grabbit 2026-02-19 00:01:34 +08:00
parent e8f1971d63
commit 16d11aa4ef

View File

@ -229,6 +229,9 @@ fn spawn_warmup(
shutdown: &Arc<AtomicBool>,
) {
if config.warmup.rules.is_empty() || !config.warmup.auto {
// Clear stale warmup status when rules are removed or auto is disabled
let mut status = shared_status.write().unwrap();
status.warmup.clear();
return;
}