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:
William Lallemand 2022-05-04 14:29:46 +02:00
parent 9ff95e2269
commit 8b9a2df969

View File

@ -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;