Do not delete persistent sessions in the purge script (#325)
This commit is contained in:
parent
5a216dcddc
commit
bf2187c75b
@ -97,15 +97,21 @@ for my $backend (@backends) {
|
||||
my $entry = shift;
|
||||
my $id = shift;
|
||||
my $time = time;
|
||||
|
||||
# Do net check sessions without _utime
|
||||
return undef unless $entry->{_utime};
|
||||
|
||||
# Session expired
|
||||
if ( $time - $entry->{_utime} > $conf->{timeout} ) {
|
||||
push @t, $id;
|
||||
}
|
||||
|
||||
# User has no activity, so considere the session has expired
|
||||
elsif ( $conf->{timeoutActivity} and $entry->{_lastSeen}
|
||||
elsif ( $conf->{timeoutActivity}
|
||||
and $entry->{_lastSeen}
|
||||
and $time - $entry->{_lastSeen} > $conf->{timeoutActivity} )
|
||||
{
|
||||
push @t, $id
|
||||
push @t, $id;
|
||||
}
|
||||
undef;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user