MAJOR: servers: propagate server status changes asynchronously.
In order to prepare multi-thread development, code was re-worked
to propagate changes asynchronoulsy.
Servers with pending status changes are registered in a list
and this one is processed and emptied only once 'run poll' loop.
Operational status changes are performed before administrative
status changes.
In a case of multiple operational status change or admin status
change in the same 'run poll' loop iteration, those changes are
merged to reach only the targeted status.
diff --git a/src/haproxy.c b/src/haproxy.c
index 2fa00a4..a5e4a38 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2182,6 +2182,9 @@
cur_poller.poll(&cur_poller, next);
fd_process_cached_events();
applet_run_active();
+
+ /* Commit server status changes */
+ servers_update_status();
}
}