diff --git a/src/checks.c b/src/checks.c index 1268cda5e..e5dfdd73c 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1447,8 +1447,12 @@ static int wake_srv_chk(struct conn_stream *cs) ret = tcpcheck_main(check); cs = check->cs; conn = cs->conn; - } else if (!(check->wait_list.events & SUB_RETRY_SEND)) - __event_srv_chk_w(cs); + } else { + if (!(check->wait_list.events & SUB_RETRY_SEND)) + __event_srv_chk_w(cs); + if (!(check->wait_list.events & SUB_RETRY_RECV)) + __event_srv_chk_r(cs); + } if (unlikely(conn->flags & CO_FL_ERROR || cs->flags & CS_FL_ERROR)) { /* We may get error reports bypassing the I/O handlers, typically @@ -2260,7 +2264,9 @@ static struct task *process_chk_conn(struct task *t, void *context, unsigned sho * sending since otherwise we won't be woken up. */ __event_srv_chk_w(cs); - __event_srv_chk_r(cs); + if (!(conn->flags & CO_FL_WAIT_L4_CONN) || + !(check->wait_list.events & SUB_RETRY_SEND)) + __event_srv_chk_r(cs); } task_set_affinity(t, tid_bit);