[BUG] stick table purge failure if size less than 255

If table size is lower than 256, we can't force to purge old entries.
This patch should be backported to 1.4.
This commit is contained in:
Emeric Brun 2010-09-23 18:10:00 +02:00 committed by Willy Tarreau
parent da4d9fe5a4
commit fbce6d0215

View File

@ -158,7 +158,7 @@ struct stksess *stksess_new(struct stktable *t, struct stktable_key *key)
if ( t->nopurge )
return NULL;
if (!stktable_trash_oldest(t, t->size >> 8))
if (!stktable_trash_oldest(t, (t->size >> 8) + 1))
return NULL;
}