mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-06 15:41:36 +01:00
The loop in tcpcheck_main() function is quite hard to understand. Depending where we are in the loop, The current_step is the currentely executed rule or the one to execute on the next call to tcpcheck_main(). When the check result is reported, we rely on the rule pointed by last_started_step or the one pointed by current_step. In addition, the loop does not use the common list_for_each_entry macro and it is thus quite confusing. So the loop has been totally rewritten and splitted to several functions to simplify its reading and its understanding. Tcp-check rules are evaluated in dedicated functions. And a common for_each loop is used and only one rule is referenced, the current one.