From: Frederic Lecaille Date: Thu, 30 Jul 2026 07:23:01 +0000 (+0200) Subject: BUG/MINOR: haload: fix rate limit bypass during stream errors X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1654e42084cbbb26bffb304fc9bf684e25d5321b;p=thirdparty%2Fhaproxy.git BUG/MINOR: haload: fix rate limit bypass during stream errors In hld_strm_task(), stream errors triggered an unconditional task_wakeup() on the user task. This bypassed arg_rate and caused haload to send connection retries as fast as possible instead of respecting the configured request rate. Call hld_usr_schedule() when arg_rate is set to guarantee that rate pacing is preserved even when streams fail. --- diff --git a/src/haload.c b/src/haload.c index 9df8ce7f3..ee8ebe470 100644 --- a/src/haload.c +++ b/src/haload.c @@ -1346,7 +1346,10 @@ struct task *hld_strm_task(struct task *t, void *context, unsigned int state) /* Note that the user task will release all the expired streams * attached to it. */ - task_wakeup(usr->task, TASK_WOKEN_IO); + if (!arg_rate) + task_wakeup(usr->task, TASK_WOKEN_IO); + else + hld_usr_schedule(usr, arg_rate); LIST_DELETE(&hs->list); hldstream_free(&hs); t = NULL;