diff options
author | Eric Wong <e@80x24.org> | 2023-10-04 03:49:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-04 17:46:41 +0000 |
commit | dba2f9999053aa2bbe2682bfe94ceae829f1f59c (patch) | |
tree | df81bf4f955dda694c6970f96140790e41d25e22 /lib/PublicInbox/LEI.pm | |
parent | c9408ccab6c9e1a17805d0f162b02f54753595ee (diff) | |
download | public-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.pm | 2 |
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: $!"; |