From: Christopher Faulet Date: Fri, 24 Jan 2020 10:41:38 +0000 (+0100) Subject: BUG/MINOR: http-ana: Increment the backend counters on the backend X-Git-Tag: v2.2-dev2~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be20cf36af96da357375812e6f825bcdf24dc3d1;p=thirdparty%2Fhaproxy.git BUG/MINOR: http-ana: Increment the backend counters on the backend 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. --- diff --git a/src/http_ana.c b/src/http_ana.c index 25110f18c4..41df0618ec 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -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;