From f4a90fa9b43ab9cb9b23094a619268d017057f04 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 21 Jul 2014 15:44:06 +0200 Subject: [PATCH] Another fix in room expiration logic Before that, only one room could be expired each time we called delete_rooms helper --- public/vroom.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/vroom.pl b/public/vroom.pl index f1bca38..8e4f329 100755 --- a/public/vroom.pl +++ b/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};