From cd1cc813292aab8a6e2e76811d125cee67c31d65 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 18 Sep 2019 08:01:20 +0200 Subject: [PATCH] Revert "BUG/MINOR: checks: do not uselessly poll for reads before the connection is up" This reverts commit ab160a47acde9dc9c341b328c8716a721a389ab4. Gbp-Pq: Name 0001-Revert-BUG-MINOR-checks-do-not-uselessly-poll-for-re.patch --- src/checks.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/checks.c b/src/checks.c index 7b55abd..bf1a8c9 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1447,12 +1447,8 @@ 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); - if (!(check->wait_list.events & SUB_RETRY_RECV)) - __event_srv_chk_r(cs); - } + } else if (!(check->wait_list.events & SUB_RETRY_SEND)) + __event_srv_chk_w(cs); if (unlikely(conn->flags & CO_FL_ERROR || cs->flags & CS_FL_ERROR)) { /* We may get error reports bypassing the I/O handlers, typically @@ -2262,9 +2258,7 @@ 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); - if (!(conn->flags & CO_FL_WAIT_L4_CONN) || - !(check->wait_list.events & SUB_RETRY_SEND)) - __event_srv_chk_r(cs); + __event_srv_chk_r(cs); } task_set_affinity(t, tid_bit); -- 2.30.2