]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] stick-table: correctly refresh expiration timers
authorWilly Tarreau <w@1wt.eu>
Tue, 13 Jul 2010 13:20:24 +0000 (15:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 13 Jul 2010 13:20:24 +0000 (15:20 +0200)
The store operation did not correctly refresh the expiration timer
on the stick entry. It did so on the temporary one instead.

src/session.c

index 7c1e4761dd2b8c98e929172e1bf749359a1baae6..556fffefcbf5986a8fa68ad3a6c34d647647dee8 100644 (file)
@@ -963,7 +963,7 @@ int process_sticking_rules(struct session *s, struct buffer *req, int an_bit)
                                                        }
                                                }
                                        }
-                                       ts->expire = tick_add(now_ms, MS_TO_TICKS(rule->table.t->expire));
+                                       stktable_touch(rule->table.t, ts);
                                }
                        }
                        if (rule->flags & STK_IS_STORE) {
@@ -1058,7 +1058,7 @@ int process_store_rules(struct session *s, struct buffer *rep, int an_bit)
                ts = stktable_lookup(s->store[i].table, s->store[i].ts);
                if (ts) {
                        /* the entry already existed, we can free ours */
-                       stktable_touch(s->store[i].table, s->store[i].ts);
+                       stktable_touch(s->store[i].table, ts);
                        stksess_free(s->store[i].table, s->store[i].ts);
                }
                else