]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stream: Simplify retries counter calculation
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 29 Mar 2022 14:08:44 +0000 (16:08 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Apr 2022 13:10:14 +0000 (15:10 +0200)
commit731c8e6cf9a89a17d58a626dd409cb3991c1f40c
treefea30af84eea299d4d652c88dfe9f684a49914e3
parent909f3182591665229d8cadb1f231b88b29fd95f5
MINOR: stream: Simplify retries counter calculation

The conn_retries counter was set to the max value and decremented at each
connection retry. Thus the counter reflected the number of retries left and
not the real number of retries. All calculations of redispatch or reporting
of number of retries experienced were made using subtracts from the
configured retries, which was complicated and didn't bring any benefit.

Now, this counter is set to 0 and incremented at each retry. We know we've
reached the maximum allowed connection retries by comparing it to the
configured value. In all other cases, we directly use the counter.

This patch should address the feature request #1608.
include/haproxy/stream-t.h
include/haproxy/stream.h
src/backend.c
src/http_ana.c
src/log.c
src/stream.c