]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-ana: Increment the backend counters on the backend
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Jan 2020 10:41:38 +0000 (11:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Jan 2020 10:55:17 +0000 (11:55 +0100)
A stupid cut-paste bug was introduced in the commit cff0f739e51. Backend
counters must of course be incremented on the stream's backend. Not the
frontend.

No need to backport this patch, except if commit cff0f739e51 is backported.

src/http_ana.c

index 25110f18c443b5b230e5f80dff5f9fba219afba8..41df0618ec41d8580ea80a41cc637e72d8b0bc4c 100644 (file)
@@ -938,7 +938,7 @@ int http_process_request(struct stream *s, struct channel *req, int an_bit)
                s->flags |= SF_ERR_INTERNAL;
        _HA_ATOMIC_ADD(&sess->fe->fe_counters.internal_errors, 1);
        if (s->flags & SF_BE_ASSIGNED)
-               _HA_ATOMIC_ADD(&sess->fe->be_counters.internal_errors, 1);
+               _HA_ATOMIC_ADD(&s->be->be_counters.internal_errors, 1);
        if (sess->listener->counters)
                _HA_ATOMIC_ADD(&sess->listener->counters->internal_errors, 1);
        goto return_prx_cond;
@@ -1100,7 +1100,7 @@ int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit
                s->flags |= SF_ERR_INTERNAL;
        _HA_ATOMIC_ADD(&sess->fe->fe_counters.internal_errors, 1);
        if (s->flags & SF_BE_ASSIGNED)
-               _HA_ATOMIC_ADD(&sess->fe->be_counters.internal_errors, 1);
+               _HA_ATOMIC_ADD(&s->be->be_counters.internal_errors, 1);
        if (sess->listener->counters)
                _HA_ATOMIC_ADD(&sess->listener->counters->internal_errors, 1);
        goto return_prx_cond;