Fix stall warning spam in ClamAV scanner

Bug: Stall warning was logging every 0.2s after reaching 60s threshold
Fix: Changed >= to == so it only logs once when counter hits 300

Before: if [ stall_counter -ge 300 ]  (fires forever)
After:  if [ stall_counter -eq 300 ]  (fires once)
This commit is contained in:
cschantz
2025-12-22 20:18:39 -05:00
parent 90e0c4a8f6
commit eeacd72d6d
+1 -1
View File
@@ -969,7 +969,7 @@ for scanner in "${AVAILABLE_SCANNERS[@]}"; do
# Check for stalled scan (no log growth in 60 seconds) # Check for stalled scan (no log growth in 60 seconds)
if [ "$current_size" -eq "$last_size" ]; then if [ "$current_size" -eq "$last_size" ]; then
stall_counter=$((stall_counter + 1)) stall_counter=$((stall_counter + 1))
if [ $stall_counter -ge 300 ]; then # 60 seconds (300 * 0.2s) if [ $stall_counter -eq 300 ]; then # 60 seconds (300 * 0.2s) - log only once
log_message "WARNING: ClamAV scan appears stalled (no activity for 60s)" log_message "WARNING: ClamAV scan appears stalled (no activity for 60s)"
fi fi
else else