mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-04 18:39:37 +00:00
MEDIUM: checks: exclusively use cs_destroy() to release a connection
This way we're using the more consistent API everywhere.
This commit is contained in:
parent
3256073976
commit
ac59f361ba
@ -2210,7 +2210,7 @@ static struct task *process_chk_conn(struct task *t)
|
|||||||
cs_close(cs);
|
cs_close(cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn) {
|
if (cs) {
|
||||||
cs_destroy(cs);
|
cs_destroy(cs);
|
||||||
cs = check->cs = NULL;
|
cs = check->cs = NULL;
|
||||||
conn = NULL;
|
conn = NULL;
|
||||||
@ -2706,11 +2706,8 @@ static int tcpcheck_main(struct check *check)
|
|||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check->cs) {
|
if (check->cs)
|
||||||
if (check->cs->conn)
|
cs_destroy(check->cs);
|
||||||
conn_free(check->cs->conn);
|
|
||||||
cs_free(check->cs);
|
|
||||||
}
|
|
||||||
|
|
||||||
check->cs = cs;
|
check->cs = cs;
|
||||||
conn = cs->conn;
|
conn = cs->conn;
|
||||||
|
Loading…
Reference in New Issue
Block a user