]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats: don't count tarpitted connections twice
authorWilly Tarreau <w@1wt.eu>
Sat, 16 Nov 2013 09:06:44 +0000 (10:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 16 Nov 2013 09:06:44 +0000 (10:06 +0100)
When a connection is tarpitted, a denied req is counted once when the
action is applied, and then a failed req is counted when the tarpit
timeout expires. This is completely wrong as the tarpit is exactly
equivalent to a deny since it's a disguised deny.

So let's not increment the failed req anymore.

This fix may be backported to 1.4 which has the same issue.

src/proto_http.c

index 831eeeb7bd7c031f79b112e49dffc56ebff34533..ce41362d156cebb445d9e2e18b012484a69c210a 100644 (file)
@@ -4209,10 +4209,6 @@ int http_process_tarpit(struct session *s, struct channel *req, int an_bit)
        req->analysers = 0;
        req->analyse_exp = TICK_ETERNITY;
 
-       s->fe->fe_counters.failed_req++;
-       if (s->listener->counters)
-               s->listener->counters->failed_req++;
-
        if (!(s->flags & SN_ERR_MASK))
                s->flags |= SN_ERR_PRXCOND;
        if (!(s->flags & SN_FINST_MASK))