diff --git a/src/haproxy.c b/src/haproxy.c index 80d503086..896d11693 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -952,6 +952,12 @@ void init(int argc, char **argv) } #endif + /* Apply server states */ + apply_server_state(); + + for (px = proxy; px; px = px->next) + srv_compute_all_admin_states(px); + if (global.mode & MODE_CHECK) { struct peers *pr; struct proxy *px; @@ -973,12 +979,6 @@ void init(int argc, char **argv) exit(2); } - /* Apply server states */ - apply_server_state(); - - for (px = proxy; px; px = px->next) - srv_compute_all_admin_states(px); - global_listener_queue_task = task_new(); if (!global_listener_queue_task) { Alert("Out of memory when initializing global task\n");