]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stick-tables: Don't loop if there's nothing left
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 23 Oct 2025 08:48:38 +0000 (10:48 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 23 Oct 2025 08:51:52 +0000 (10:51 +0200)
Before waking up the expiration task again at the end of it, make sure
the next date is set. If there's nothing left to do, then task_exp will
be TASK_ETERNITY and we then don't want to be waken up again.

src/stick_table.c

index 0d50a9d63178ee56559c149682e8fc9c8961d127..a328f45aa4361f8556866f10edba990e912bdbca 100644 (file)
@@ -1135,7 +1135,7 @@ struct task *process_tables_expire(struct task *task, void *context, unsigned in
                table_eb = tmpnode;
        }
 
-       if (tick_is_le(task_exp, now_ms)) {
+       if (tick_isset(task_exp) && tick_is_le(task_exp, now_ms)) {
                /*
                 * More to do, we should wake up immediately.
                 */