mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-31 07:37:54 +00:00
BUG/MAJOR: servers: Correctly use LIST_ELEM().
To access the first element of the list, correctly use LIST_ELEM(), or we end up getting the head of the list, instead of getting the first connection. This should be backported to 1.9.
This commit is contained in:
parent
c3fa638b4c
commit
5f7de56a08
@ -1151,7 +1151,7 @@ int connect_server(struct stream *s)
|
||||
srv_conn = NULL;
|
||||
for (i = 0; i < MAX_SRV_LIST; i++) {
|
||||
if (!LIST_ISEMPTY(&s->sess->srv_list[i].list)) {
|
||||
srv_conn = LIST_ELEM(&s->sess->srv_list[i].list,
|
||||
srv_conn = LIST_ELEM(s->sess->srv_list[i].list.n,
|
||||
struct connection *, session_list);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user