mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
BUG/MEDIUM: checks: Unsubscribe to mux events when a conn-stream is destroyed
Since the tcp-check based heath checks uses the best multuplexer for a connection, the mux-pt is no longer the only possible choice. So events subscriptions and unsubscriptions must be done with the mux. No backport needed.
This commit is contained in:
parent
8021a5f4a5
commit
0b9376ae8d
13
src/checks.c
13
src/checks.c
@ -1660,8 +1660,7 @@ static enum tcpcheck_eval_ret tcpcheck_eval_connect(struct check *check, struct
|
|||||||
/* 3- release and replace the old one on success */
|
/* 3- release and replace the old one on success */
|
||||||
if (check->cs) {
|
if (check->cs) {
|
||||||
if (check->wait_list.events)
|
if (check->wait_list.events)
|
||||||
cs->conn->xprt->unsubscribe(cs->conn, cs->conn->xprt_ctx,
|
cs->conn->mux->unsubscribe(cs, check->wait_list.events, &check->wait_list);
|
||||||
check->wait_list.events, &check->wait_list);
|
|
||||||
|
|
||||||
/* We may have been scheduled to run, and the I/O handler
|
/* We may have been scheduled to run, and the I/O handler
|
||||||
* expects to have a cs, so remove the tasklet
|
* expects to have a cs, so remove the tasklet
|
||||||
@ -3270,10 +3269,7 @@ static struct task *process_chk_conn(struct task *t, void *context, unsigned sho
|
|||||||
task_set_affinity(t, MAX_THREADS_MASK);
|
task_set_affinity(t, MAX_THREADS_MASK);
|
||||||
if (cs) {
|
if (cs) {
|
||||||
if (check->wait_list.events)
|
if (check->wait_list.events)
|
||||||
cs->conn->xprt->unsubscribe(cs->conn,
|
cs->conn->mux->unsubscribe(cs, check->wait_list.events, &check->wait_list);
|
||||||
cs->conn->xprt_ctx,
|
|
||||||
check->wait_list.events,
|
|
||||||
&check->wait_list);
|
|
||||||
/* We may have been scheduled to run, and the
|
/* We may have been scheduled to run, and the
|
||||||
* I/O handler expects to have a cs, so remove
|
* I/O handler expects to have a cs, so remove
|
||||||
* the tasklet
|
* the tasklet
|
||||||
@ -3333,10 +3329,7 @@ static struct task *process_chk_conn(struct task *t, void *context, unsigned sho
|
|||||||
|
|
||||||
if (cs) {
|
if (cs) {
|
||||||
if (check->wait_list.events)
|
if (check->wait_list.events)
|
||||||
cs->conn->xprt->unsubscribe(cs->conn,
|
cs->conn->mux->unsubscribe(cs, check->wait_list.events, &check->wait_list);
|
||||||
cs->conn->xprt_ctx,
|
|
||||||
check->wait_list.events,
|
|
||||||
&check->wait_list);
|
|
||||||
/* We may have been scheduled to run, and the
|
/* We may have been scheduled to run, and the
|
||||||
* I/O handler expects to have a cs, so remove
|
* I/O handler expects to have a cs, so remove
|
||||||
* the tasklet
|
* the tasklet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user