mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-12 10:06:58 +02:00
BUG/MINOR: checks: Don't subscribe to I/O events if it is already done
Subscription to I/O events should not be performed if the check is already subscribed. No backport needed. (cherry picked from commit 9e0b3e92f73b6715fb2814e3d09b8ba62270b417) Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
This commit is contained in:
parent
2fabd9d535
commit
a2fb0c3b6f
@ -2635,10 +2635,14 @@ static int tcpcheck_main(struct check *check)
|
|||||||
if (check->current_step && check->current_step->action == TCPCHK_ACT_CONNECT) {
|
if (check->current_step && check->current_step->action == TCPCHK_ACT_CONNECT) {
|
||||||
rule = LIST_NEXT(&check->current_step->list, typeof(rule), list);
|
rule = LIST_NEXT(&check->current_step->list, typeof(rule), list);
|
||||||
if (conn && (conn->flags & CO_FL_WAIT_XPRT)) {
|
if (conn && (conn->flags & CO_FL_WAIT_XPRT)) {
|
||||||
if (rule->action == TCPCHK_ACT_SEND)
|
if (rule->action == TCPCHK_ACT_SEND) {
|
||||||
|
if (!(check->wait_list.events & SUB_RETRY_SEND))
|
||||||
conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);
|
conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);
|
||||||
else if (rule->action == TCPCHK_ACT_EXPECT)
|
}
|
||||||
|
else if (rule->action == TCPCHK_ACT_EXPECT) {
|
||||||
|
if (!(check->wait_list.events & SUB_RETRY_RECV))
|
||||||
conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
|
conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
|
||||||
|
}
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2736,6 +2740,7 @@ static int tcpcheck_main(struct check *check)
|
|||||||
|
|
||||||
if (eval_ret == TCPCHK_EVAL_WAIT) {
|
if (eval_ret == TCPCHK_EVAL_WAIT) {
|
||||||
check->current_step = rule->expect.head;
|
check->current_step = rule->expect.head;
|
||||||
|
if (!(check->wait_list.events & SUB_RETRY_RECV))
|
||||||
conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
|
conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user