mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MEDIUM: checks: Increment the server's curr_used_conns
In tcpcheck_eval_connect(), if we're targetting a server, increase its curr_used_conns when creating a new connection, as the counter will be decreased later when the connection is destroyed and conn_free() is called.
This commit is contained in:
parent
4ba494ca1b
commit
db6fe694b3
1 changed files with 5 additions and 1 deletions
|
|
@ -1026,7 +1026,11 @@ enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct tcpchec
|
|||
|
||||
/* Maybe there were an older connection we were waiting on */
|
||||
check->wait_list.events = 0;
|
||||
conn->target = s ? &s->obj_type : &proxy->obj_type;
|
||||
if (s) {
|
||||
_HA_ATOMIC_ADD(&s->curr_used_conns, 1);
|
||||
conn->target = &s->obj_type;
|
||||
} else
|
||||
conn->target = &proxy->obj_type;
|
||||
|
||||
/* no client address */
|
||||
if (!sockaddr_alloc(&conn->dst)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue