MEDIUM: servers: Use LIST_DEL_INIT() instead of LIST_DEL().

In srv_add_to_idle_list(), use LIST_DEL_INIT instead of just LIST_DEL.
We're about to add the connection to a mt_list, and MT_LIST_ADD/MT_LIST_ADDQ
will be modified to make sure we're not adding the element if it's already
in a list.
This commit is contained in:
Olivier Houchard 2019-09-20 18:08:29 +02:00 committed by Olivier Houchard
parent 5e9b92cbff
commit 9570ecf662
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ static inline int srv_add_to_idle_list(struct server *srv, struct connection *co
_HA_ATOMIC_SUB(&srv->curr_idle_conns, 1); _HA_ATOMIC_SUB(&srv->curr_idle_conns, 1);
return 0; return 0;
} }
LIST_DEL(&conn->list); LIST_DEL_INIT(&conn->list);
MT_LIST_ADDQ(&srv->idle_orphan_conns[tid], (struct mt_list *)&conn->list); MT_LIST_ADDQ(&srv->idle_orphan_conns[tid], (struct mt_list *)&conn->list);
srv->curr_idle_thr[tid]++; srv->curr_idle_thr[tid]++;