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:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user