From 3d16be1f0f87094d656c938b90657ab2045fdce8 Mon Sep 17 00:00:00 2001 From: tftadmin Appleton Date: Wed, 18 May 2022 17:37:23 -0500 Subject: [PATCH] Only keep ZM_COOKIE_LIFETIME entries in Sessions. --- scripts/zmstats.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zmstats.pl.in b/scripts/zmstats.pl.in index a03f68ada..a3c26b020 100644 --- a/scripts/zmstats.pl.in +++ b/scripts/zmstats.pl.in @@ -89,7 +89,7 @@ while (!$zm_terminate) { my $rows; do { # Delete any sessions that are more than a week old. Limiting to 100 because mysql sucks - $rows = zmDbDo('DELETE FROM Sessions WHERE access < ? LIMIT 100', time - (60*60*24*7)); + $rows = zmDbDo('DELETE FROM Sessions WHERE access < ? LIMIT 100', time - ZM_COOKIE_LIFETIME); Debug("Deleted $rows sessions") if $rows; } while ($rows and ($rows == 100) and !$zm_terminate);