diff --git a/include/proto/connection.h b/include/proto/connection.h index 3bfad58ef..1326a15f9 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -699,7 +699,6 @@ static inline void conn_free(struct connection *conn) conn_force_unsubscribe(conn); LIST_DEL_LOCKED(&conn->list); - LIST_INIT(&conn->list); pool_free(pool_head_connection, conn); } diff --git a/src/backend.c b/src/backend.c index ace0ca402..dfdb9b531 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1308,11 +1308,9 @@ int connect_server(struct stream *s) (((s->be->options & PR_O_REUSE_MASK) != PR_O_REUSE_NEVR) && s->txn && (s->txn->flags & TX_NOT_FIRST)))) { srv_conn = LIST_POP_LOCKED(&srv->idle_orphan_conns[tid], - struct connection *, list); - if (srv_conn) { - LIST_INIT(&srv_conn->list); + struct connection *, list); + if (srv_conn) reuse_orphan = 1; - } } /* If we've picked a connection from the pool, we now have to diff --git a/src/server.c b/src/server.c index b9336f565..bffc2ee50 100644 --- a/src/server.c +++ b/src/server.c @@ -5317,7 +5317,6 @@ struct task *srv_cleanup_toremove_connections(struct task *task, void *context, while ((conn = LIST_POP_LOCKED(&toremove_connections[tid], struct connection *, list)) != NULL) { - LIST_INIT(&conn->list); conn->mux->destroy(conn); }