mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-09 08:51:28 -04:00
MINOR: init: exit() after pre-check upon error
Add a test on the err_code variable so we don't go further if one of the pre-check callback failed.
This commit is contained in:
parent
9ff95e2269
commit
8b9a2df969
1 changed files with 5 additions and 0 deletions
|
|
@ -2117,6 +2117,11 @@ static void init(int argc, char **argv)
|
|||
list_for_each_entry(prcf, &pre_check_list, list)
|
||||
err_code |= prcf->fct();
|
||||
|
||||
if (err_code & (ERR_ABORT|ERR_FATAL)) {
|
||||
ha_alert("Fatal errors found in configuration.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
err_code |= check_config_validity();
|
||||
for (px = proxies_list; px; px = px->next) {
|
||||
struct server *srv;
|
||||
|
|
|
|||
Loading…
Reference in a new issue