]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: checks: do not call conn_xprt_stop_send() anymore
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2020 09:13:03 +0000 (10:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2020 10:21:12 +0000 (11:21 +0100)
While trying to address issue #253, Commit 5909380c ("BUG/MINOR: checks:
stop polling for write when we have nothing left to send") made sure that
we stop polling for writes when the buffer is empty. This was actually
more a workaround than a bug fix because by doing so we may be stopping
polling for an intermediary transport layer without acting on the check
itself in case there's SSL or send-proxy in the chain for example, thus
the approach is wrong. In practice due to the small size of check
requests, this will not have any impact. At best, we ought to unsubscribe
for sending, but that's already the case when we arrive in this function.
But given that the root cause of the issue was addressed later in commits
cc705a6bc5940392 and ccf3f6d1, we can now safely revert this change.

It was confirmed on the faulty config that this change doesn't have any
effect anymore on the test.

src/checks.c

index 3a74996cf55ae47b85db9e2c0f7375515c48e995..1c71ea618fea2c3a8addfed7f41d93e8d4cb88ab 100644 (file)
@@ -788,9 +788,6 @@ static void __event_srv_chk_w(struct conn_stream *cs)
                }
        }
 
-       if (!b_data(&check->bo))
-               conn_xprt_stop_send(conn);
-
        /* full request sent, we allow up to <timeout.check> if nonzero for a response */
        if (s->proxy->timeout.check) {
                t->expire = tick_add_ifset(now_ms, s->proxy->timeout.check);