[BUG] stick-table: correctly refresh expiration timers

The store operation did not correctly refresh the expiration timer
on the stick entry. It did so on the temporary one instead.
This commit is contained in:
Willy Tarreau 2010-07-13 15:20:24 +02:00
parent d669a4f72b
commit e8f6338c5d

View 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) { 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); ts = stktable_lookup(s->store[i].table, s->store[i].ts);
if (ts) { if (ts) {
/* the entry already existed, we can free ours */ /* 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); stksess_free(s->store[i].table, s->store[i].ts);
} }
else else