diff --git a/src/backend.c b/src/backend.c index c6317bb26..359bd499f 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1515,7 +1515,7 @@ static int connect_server(struct stream *s) /* First, try from our own idle list */ HA_SPIN_LOCK(IDLE_CONNS_LOCK, &idle_conns[tid].idle_conns_lock); if (!LIST_ISEMPTY(&srv->per_thr[tid].idle_conn_list)) { - tokill_conn = LIST_ELEM(&srv->per_thr[tid].idle_conn_list.n, struct connection *, idle_list); + tokill_conn = LIST_ELEM(srv->per_thr[tid].idle_conn_list.n, struct connection *, idle_list); conn_delete_from_tree(tokill_conn); HA_SPIN_UNLOCK(IDLE_CONNS_LOCK, &idle_conns[tid].idle_conns_lock); @@ -1544,7 +1544,7 @@ static int connect_server(struct stream *s) continue; if (!LIST_ISEMPTY(&srv->per_thr[i].idle_conn_list)) { - tokill_conn = LIST_ELEM(&srv->per_thr[i].idle_conn_list.n, struct connection *, idle_list); + tokill_conn = LIST_ELEM(srv->per_thr[i].idle_conn_list.n, struct connection *, idle_list); conn_delete_from_tree(tokill_conn); } HA_SPIN_UNLOCK(IDLE_CONNS_LOCK, &idle_conns[i].idle_conns_lock); diff --git a/src/server.c b/src/server.c index e7ce3d70b..37e8beba0 100644 --- a/src/server.c +++ b/src/server.c @@ -5949,7 +5949,7 @@ static int srv_migrate_conns_to_remove(struct list *list, struct mt_list *toremo if (toremove_nb != -1 && i >= toremove_nb) break; - conn = LIST_ELEM(list->n, struct connection *, toremove_list); + conn = LIST_ELEM(list->n, struct connection *, idle_list); conn_delete_from_tree(conn); MT_LIST_APPEND(toremove_list, &conn->toremove_list); i++;