Only keep ZM_COOKIE_LIFETIME entries in Sessions.

pull/3494/head
tftadmin Appleton 2022-05-18 17:37:23 -05:00 committed by Isaac Connor
parent ad2a2be7ef
commit 3d16be1f0f
1 changed files with 1 additions and 1 deletions

View File

@ -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);