Another fix in room expiration logic

Before that, only one room could be expired each time we called delete_rooms helper
master
Daniel Berteaud 10 years ago
parent 8552ac2fdf
commit f4a90fa9b4
  1. 5
      public/vroom.pl

@ -383,7 +383,10 @@ helper delete_rooms => sub {
$self->db->prepare("SELECT `name` FROM `rooms` WHERE `activity_timestamp` < $timeout AND `persistent`='0';")
} || return undef;
$sth->execute();
my @toDeleteName = $sth->fetchrow_array;
my @toDeleteName = ();
while (my $room = $sth->fetchrow_array){
push @toDeleteName, $room;
}
my @toDeleteId = ();
if ($config->{persistentInactivityTimeout} > 0){
$timeout = time()-$config->{persistentInactivityTimeout};

Loading…
Cancel
Save