]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stream: Reset response analyse expiration date if there is no analyzer
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Aug 2023 06:25:01 +0000 (08:25 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Aug 2023 09:33:45 +0000 (11:33 +0200)
When the stream expiration date is computed at the end of process_stream(),
if there is no longer analyzer on the request channel, its analyse
expiration date is reset. The same is now performed on the response
channel. This way, we are sure to not inherit of an orphan expired date.

This should prevent spinning loop on process_stream().

src/stream.c

index ef35b6e3c7b0b43830d858bde41828ee275533d9..d3d029a5e79a0f01b1d4e4e28a6a69ec20eb4823 100644 (file)
@@ -2565,6 +2565,8 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
 
                if (!req->analysers)
                        req->analyse_exp = TICK_ETERNITY;
+               if (!res->analysers)
+                       res->analyse_exp = TICK_ETERNITY;
 
                if ((sess->fe->options & PR_O_CONTSTATS) && (s->flags & SF_BE_ASSIGNED) &&
                          (!tick_isset(req->analyse_exp) || tick_is_expired(req->analyse_exp, now_ms)))