CRITICAL FIX: Handle background job failures in wait command

Line 1900: Changed 'wait' to 'wait || true'
- Background IP reputation update jobs may fail (incomplete features)
- With set -e, failed wait command exits entire script
- Using '|| true' allows script to continue even if background jobs fail
- Allows threat score calculation to complete and next functions to run

This fixes the script exit issue after 'Calculating threat scores...'
This commit is contained in:
Developer
2026-04-23 20:00:39 -04:00
parent 6dfc47d831
commit 54e4d5b67f
+2 -2
View File
@@ -1896,8 +1896,8 @@ calculate_threat_scores() {
fi
done | sort -t'|' -k1 -rn > "$TEMP_DIR/threat_scores.txt"
# Wait for background IP reputation updates to complete
wait
# Wait for background IP reputation updates to complete (don't fail if background jobs error)
wait || true
print_success "Threat scores calculated and IP reputation updated"
}