mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-21 21:26:58 +00:00
[MEDIUM] reverse internal proxy declaration order to match configuration
People are regularly complaining that proxies are linked in reverse order when reading the stats. This is now definitely fixed because the proxy order is now fixed to match configuration order.
This commit is contained in:
parent
d869b24119
commit
55bc0f8eb7
@ -3096,6 +3096,19 @@ int readcfgfile(const char *file)
|
||||
/* will be needed further to delay some tasks */
|
||||
tv_update_date(0,1);
|
||||
|
||||
/* first, we will invert the proxy list order */
|
||||
curproxy = NULL;
|
||||
while (proxy) {
|
||||
struct proxy *next;
|
||||
|
||||
next = proxy->next;
|
||||
proxy->next = curproxy;
|
||||
curproxy = proxy;
|
||||
if (!next)
|
||||
break;
|
||||
proxy = next;
|
||||
}
|
||||
|
||||
if ((curproxy = proxy) == NULL) {
|
||||
Alert("parsing %s : no <listen> line. Nothing to do !\n",
|
||||
file);
|
||||
|
Loading…
Reference in New Issue
Block a user