From: Vincent Bernat Date: Wed, 18 Sep 2019 06:01:20 +0000 (+0200) Subject: Revert "BUG/MINOR: checks: do not uselessly poll for reads before the connection... X-Git-Tag: archive/raspbian/2.0.6-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cd1cc813292aab8a6e2e76811d125cee67c31d65;p=haproxy.git 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 --- 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);