Updated session handler gc settings name to be more unique.
This commit is contained in:
parent
5958f68d6e
commit
2c6fef0742
@ -444,9 +444,9 @@ sub session_cleanup {
|
|||||||
my $timelimit = $now - $self -> {"auth"} -> get_config("session_length");
|
my $timelimit = $now - $self -> {"auth"} -> get_config("session_length");
|
||||||
|
|
||||||
# We only want to run the garbage collect occasionally
|
# We only want to run the garbage collect occasionally
|
||||||
if($self -> {"settings"} -> {"config"} -> {"lastgc"} < $now - $self -> {"auth"} -> get_config("session_gc")) {
|
if($self -> {"settings"} -> {"config"} -> {"Session:lastgc"} < $now - $self -> {"auth"} -> get_config("session_gc")) {
|
||||||
# Okay, we're due a garbage collect, update the config to reflect that we're doing it
|
# Okay, we're due a garbage collect, update the config to reflect that we're doing it
|
||||||
$self -> {"settings"} -> set_db_config($self -> {"dbh"}, $self -> {"settings"} -> {"database"} -> {"settings"}, "lastgc", $now);
|
$self -> {"settings"} -> set_db_config($self -> {"dbh"}, $self -> {"settings"} -> {"database"} -> {"settings"}, "Session:lastgc", $now);
|
||||||
|
|
||||||
# Remove expired guest sessions first
|
# Remove expired guest sessions first
|
||||||
my $nukesess = $self -> {"dbh"} -> prepare("DELETE FROM ".$self -> {"settings"} -> {"database"} -> {"sessions"}.
|
my $nukesess = $self -> {"dbh"} -> prepare("DELETE FROM ".$self -> {"settings"} -> {"database"} -> {"sessions"}.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user