diff --git a/include/haproxy/session-t.h b/include/haproxy/session-t.h index 3bb753acf..45b820cb3 100644 --- a/include/haproxy/session-t.h +++ b/include/haproxy/session-t.h @@ -54,9 +54,10 @@ struct session { struct vars vars; /* list of variables for the session scope. */ struct task *task; /* handshake timeout processing */ long t_handshake; /* handshake duration, -1 = not completed */ + long t_idle; /* idle duration, -1 if never occurs */ int idle_conns; /* Number of connections we're currently responsible for that we are not using */ - struct list srv_list; /* List of servers and the connections the session is currently responsible for */ unsigned int flags; /* session flags, SESS_FL_* */ + struct list srv_list; /* List of servers and the connections the session is currently responsible for */ }; struct sess_srv_list { diff --git a/src/session.c b/src/session.c index 710b6b6f6..07828df96 100644 --- a/src/session.c +++ b/src/session.c @@ -50,6 +50,7 @@ struct session *session_new(struct proxy *fe, struct listener *li, enum obj_type vars_init(&sess->vars, SCOPE_SESS); sess->task = NULL; sess->t_handshake = -1; /* handshake not done yet */ + sess->t_idle = -1; _HA_ATOMIC_ADD(&totalconn, 1); _HA_ATOMIC_ADD(&jobs, 1); LIST_INIT(&sess->srv_list);