From e0a8b260ff1eabbe30240073d745eff58cf4698b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=8Dan?= Date: Fri, 20 Feb 2026 20:35:19 -0700 Subject: [PATCH] fix: use maxlock (not maxtemp) as default for purge() maxlock in Simple.pm Simple::purge() was using $self->{maxtemp} as the default value for the maxlock option instead of $self->{maxlock}. This caused locked elements to be cleaned up after 300 seconds (maxtemp default) instead of the intended 600 seconds (maxlock default), potentially removing locks that were still legitimately held. --- lib/Directory/Queue/Simple.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Directory/Queue/Simple.pm b/lib/Directory/Queue/Simple.pm index 2f3545f..874d2ec 100644 --- a/lib/Directory/Queue/Simple.pm +++ b/lib/Directory/Queue/Simple.pm @@ -304,7 +304,7 @@ sub purge : method { # check options $option{maxtemp} = $self->{maxtemp} unless defined($option{maxtemp}); - $option{maxlock} = $self->{maxtemp} unless defined($option{maxlock}); + $option{maxlock} = $self->{maxlock} unless defined($option{maxlock}); foreach my $name (keys(%option)) { dief("unexpected option: %s", $name) unless $name =~ /^(maxtemp|maxlock)$/;