]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Lock.pm
doc: re-add missing 1.6 release notes
[public-inbox.git] / lib / PublicInbox / Lock.pm
index 1d0b4f9cbcbb104741bb6cb09396184d71fcad53..bb213de448c3f6c4ca08a0f8dd7ec34b40420590 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Base class for per-inbox locking
@@ -37,7 +37,7 @@ sub lock_release {
 # caller must use return value
 sub lock_for_scope {
        my ($self, @single_pid) = @_;
-       $self->lock_acquire;
+       lock_acquire($self) or return; # lock_path not set
        PublicInbox::OnDestroy->new(@single_pid, \&lock_release, $self);
 }