Skip to content

Commit

Permalink
Change: Don't perform alive tests if "consider alive" method is selected
Browse files Browse the repository at this point in the history
When more than one alive test method is selected, boreas check for each one until the host is alive. This will be done also even if the "consider alive" methods is selected.
This patch improves boreas to not run other selected alive methods if "consider alive" method is set
  • Loading branch information
jjnicola committed Oct 17, 2023
1 parent 19af05f commit 3bf5657
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boreas/boreas_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ get_alive_test_methods (alive_test_t *alive_test)
{
*alive_test = atoi (alive_test_pref_as_str);
}

// If consider_alive method is set, unset the other methods
// since it doesn't make sense.
if (*alive_test & ALIVE_TEST_CONSIDER_ALIVE)
*alive_test = ALIVE_TEST_CONSIDER_ALIVE;

return error;
}

Expand Down

0 comments on commit 3bf5657

Please sign in to comment.