mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
CLEANUP: connection: remove unused field idle_time from the connection struct
Thanks to previous changes, this field is now unused.
This commit is contained in:
parent
c6e7563b1a
commit
0f9ff14b17
@ -489,7 +489,6 @@ struct connection {
|
|||||||
struct sockaddr_storage *src; /* source address (pool), when known, otherwise NULL */
|
struct sockaddr_storage *src; /* source address (pool), when known, otherwise NULL */
|
||||||
struct sockaddr_storage *dst; /* destination address (pool), when known, otherwise NULL */
|
struct sockaddr_storage *dst; /* destination address (pool), when known, otherwise NULL */
|
||||||
char *proxy_authority; /* Value of authority TLV received via PROXYv2 */
|
char *proxy_authority; /* Value of authority TLV received via PROXYv2 */
|
||||||
unsigned int idle_time; /* Time the connection was added to the idle list, or 0 if not in the idle list */
|
|
||||||
uint8_t proxy_authority_len; /* Length of authority TLV received via PROXYv2 */
|
uint8_t proxy_authority_len; /* Length of authority TLV received via PROXYv2 */
|
||||||
struct ist proxy_unique_id; /* Value of the unique ID TLV received via PROXYv2 */
|
struct ist proxy_unique_id; /* Value of the unique ID TLV received via PROXYv2 */
|
||||||
};
|
};
|
||||||
|
@ -328,7 +328,6 @@ static inline void conn_init(struct connection *conn, void *target)
|
|||||||
MT_LIST_INIT(&conn->list);
|
MT_LIST_INIT(&conn->list);
|
||||||
LIST_INIT(&conn->session_list);
|
LIST_INIT(&conn->session_list);
|
||||||
conn->subs = NULL;
|
conn->subs = NULL;
|
||||||
conn->idle_time = 0;
|
|
||||||
conn->src = NULL;
|
conn->src = NULL;
|
||||||
conn->dst = NULL;
|
conn->dst = NULL;
|
||||||
conn->proxy_authority = NULL;
|
conn->proxy_authority = NULL;
|
||||||
|
@ -242,7 +242,6 @@ static inline enum srv_initaddr srv_get_next_initaddr(unsigned int *list)
|
|||||||
static inline void srv_use_idle_conn(struct server *srv, struct connection *conn)
|
static inline void srv_use_idle_conn(struct server *srv, struct connection *conn)
|
||||||
{
|
{
|
||||||
if (conn->flags & CO_FL_LIST_MASK) {
|
if (conn->flags & CO_FL_LIST_MASK) {
|
||||||
conn->idle_time = 0;
|
|
||||||
_HA_ATOMIC_SUB(&srv->curr_idle_conns, 1);
|
_HA_ATOMIC_SUB(&srv->curr_idle_conns, 1);
|
||||||
_HA_ATOMIC_SUB(conn->flags & CO_FL_SAFE_LIST ? &srv->curr_safe_nb : &srv->curr_idle_nb, 1);
|
_HA_ATOMIC_SUB(conn->flags & CO_FL_SAFE_LIST ? &srv->curr_safe_nb : &srv->curr_idle_nb, 1);
|
||||||
_HA_ATOMIC_SUB(&srv->curr_idle_thr[tid], 1);
|
_HA_ATOMIC_SUB(&srv->curr_idle_thr[tid], 1);
|
||||||
@ -315,7 +314,6 @@ static inline int srv_add_to_idle_list(struct server *srv, struct connection *co
|
|||||||
}
|
}
|
||||||
_HA_ATOMIC_SUB(&srv->curr_used_conns, 1);
|
_HA_ATOMIC_SUB(&srv->curr_used_conns, 1);
|
||||||
MT_LIST_DEL(&conn->list);
|
MT_LIST_DEL(&conn->list);
|
||||||
conn->idle_time = now_ms;
|
|
||||||
if (is_safe) {
|
if (is_safe) {
|
||||||
conn->flags = (conn->flags & ~CO_FL_LIST_MASK) | CO_FL_SAFE_LIST;
|
conn->flags = (conn->flags & ~CO_FL_LIST_MASK) | CO_FL_SAFE_LIST;
|
||||||
MT_LIST_ADDQ(&srv->safe_conns[tid], (struct mt_list *)&conn->list);
|
MT_LIST_ADDQ(&srv->safe_conns[tid], (struct mt_list *)&conn->list);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user