]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: checks: Don't try to send outgoing data if waiting to be able to send
authorChristopher Faulet <cfaulet@haproxy.com>
Sat, 9 May 2020 15:37:43 +0000 (17:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 12 May 2020 08:06:47 +0000 (10:06 +0200)
It is useless to try to send outgoing data if the check is still waiting to be
able to send data.

No backport needed.

(cherry picked from commit d94653700437430864c03090d710b95f4e860321)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/checks.c

index 90ccff13ead99f5e064387f02433d2d3e7ffce6f..901deb991f0df61f73b3fd620c315e060a17fe98 100644 (file)
@@ -2654,6 +2654,10 @@ static int tcpcheck_main(struct check *check)
         *    TCPCHK_ACT_SEND. */
        else if (check->current_step && check->current_step->action == TCPCHK_ACT_SEND) {
                if (conn && b_data(&check->bo)) {
+                       /* We're already waiting to be able to send, give up */
+                       if (check->wait_list.events & SUB_RETRY_SEND)
+                               goto out;
+
                        ret = conn->mux->snd_buf(cs, &check->bo,
                                                 (IS_HTX_CONN(conn) ? (htxbuf(&check->bo))->data: b_data(&check->bo)), 0);
                        if (ret <= 0) {