From 2bac2c5e41de98f9aa50fbf69060a3bdef54f61f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 4 Oct 2023 03:49:19 +0000 Subject: lei: do_env combines fchdir and local This will make switching $lei contexts less error-prone and hopefully save us from some suprising bugs in the future. Followup-to: 759885e60e59 (lei: ensure --stdin sets %ENV and $current_lei, 2023-09-14) --- lib/PublicInbox/LeiAuth.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/LeiAuth.pm') diff --git a/lib/PublicInbox/LeiAuth.pm b/lib/PublicInbox/LeiAuth.pm index 9b09cecf..76a4410d 100644 --- a/lib/PublicInbox/LeiAuth.pm +++ b/lib/PublicInbox/LeiAuth.pm @@ -57,7 +57,7 @@ sub net_merge_all { # called in wq worker via wq_broadcast # called by top-level lei-daemon when first worker is done with auth # passes updated net auth info to current workers sub net_merge_continue { - my ($wq, $lei, $net_new) = @_; + my ($lei, $wq, $net_new) = @_; $wq->{-net_new} = $net_new; # for "lei up" $wq->wq_broadcast('PublicInbox::LeiAuth::net_merge_all', $net_new); $wq->net_merge_all_done($lei); # defined per-WQ @@ -65,7 +65,7 @@ sub net_merge_continue { sub op_merge { # prepares PktOp->pair ops my ($self, $ops, $wq, $lei) = @_; - $ops->{net_merge_continue} = [ \&net_merge_continue, $wq, $lei ]; + $ops->{net_merge_continue} = [ \&net_merge_continue, $lei, $wq ]; } sub new { bless \(my $x), __PACKAGE__ } -- cgit v1.2.3-24-ge0c7