]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
WIP/BUG/MEDIUM: apppet: Improve again spinning loops detection with the new API
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 16 Oct 2025 09:22:22 +0000 (11:22 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 21 Oct 2025 13:18:19 +0000 (15:18 +0200)
src/applet.c

index 4b55bf9b599a25f94c8d6de1076f029892f3574d..af4e3fe05d31a1d131ab36dad4abb6660c1093d9 100644 (file)
@@ -968,7 +968,7 @@ struct task *task_process_applet(struct task *t, void *context, unsigned int sta
        }
 
        /* measure the call rate and check for anomalies when too high */
-       if (!did_recv && !did_send) {
+       if ((!did_recv && sc_is_send_allowed(sc)) && (!did_send && sc_is_recv_allowed(sc))) {
                rate = update_freq_ctr(&app->call_rate, 1);
                if (rate >= 100000 && app->call_rate.prev_ctr) // looped like this more than 100k times over last second
                        stream_dump_and_crash(&app->obj_type, read_freq_ctr(&app->call_rate));