mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-28 17:21:32 +02:00
MINOR: mux-h1: add counters instance to h1c
Add pointer to counters as a member for h1c structure. This pointer is initialized on h1_init function. This is useful to quickly access and manipulate the counters inside every h1 functions.
This commit is contained in:
parent
b4c584eed1
commit
563c345f6f
@ -108,6 +108,7 @@ struct h1c {
|
||||
|
||||
struct h1s *h1s; /* H1 stream descriptor */
|
||||
struct task *task; /* timeout management task */
|
||||
struct h1_counters *px_counters; /* h1 counters attached to proxy */
|
||||
int idle_exp; /* idle expiration date (http-keep-alive or http-request timeout) */
|
||||
int timeout; /* client/server timeout duration */
|
||||
int shut_timeout; /* client-fin/server-fin timeout duration */
|
||||
@ -850,11 +851,17 @@ static int h1_init(struct connection *conn, struct proxy *proxy, struct session
|
||||
h1c->shut_timeout = h1c->timeout = proxy->timeout.server;
|
||||
if (tick_isset(proxy->timeout.serverfin))
|
||||
h1c->shut_timeout = proxy->timeout.serverfin;
|
||||
|
||||
h1c->px_counters = EXTRA_COUNTERS_GET(proxy->extra_counters_be,
|
||||
&h1_stats_module);
|
||||
} else {
|
||||
h1c->shut_timeout = h1c->timeout = proxy->timeout.client;
|
||||
if (tick_isset(proxy->timeout.clientfin))
|
||||
h1c->shut_timeout = proxy->timeout.clientfin;
|
||||
|
||||
h1c->px_counters = EXTRA_COUNTERS_GET(proxy->extra_counters_fe,
|
||||
&h1_stats_module);
|
||||
|
||||
LIST_APPEND(&mux_stopping_data[tid].list,
|
||||
&h1c->conn->stopping_list);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user