about summary refs log tree commit homepage
path: root/lib/PublicInbox/LEI.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-04 03:49:26 +0000
committerEric Wong <e@80x24.org>2023-10-04 17:46:41 +0000
commitdba2f9999053aa2bbe2682bfe94ceae829f1f59c (patch)
treedf81bf4f955dda694c6970f96140790e41d25e22 /lib/PublicInbox/LEI.pm
parentc9408ccab6c9e1a17805d0f162b02f54753595ee (diff)
downloadpublic-inbox-dba2f9999053aa2bbe2682bfe94ceae829f1f59c.tar.gz
treewide: use PublicInbox::Lock->new
This gets rid of a few bare bless statements and helps
ensure we properly load Lock.pm before using it.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r--lib/PublicInbox/LEI.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index d611f5c3..a5a6d321 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -1311,7 +1311,7 @@ sub lazy_start {
         my ($sock_dir) = ($path =~ m!\A(.+?)/[^/]+\z!);
         $errors_log = "$sock_dir/errors.log";
         my $addr = pack_sockaddr_un($path);
-        my $lk = bless { lock_path => $errors_log }, 'PublicInbox::Lock';
+        my $lk = PublicInbox::Lock->new($errors_log);
         umask(077) // die("umask(077): $!");
         $lk->lock_acquire;
         socket($listener, AF_UNIX, SOCK_SEQPACKET, 0) or die "socket: $!";