about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiAuth.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-04 03:49:19 +0000
committerEric Wong <e@80x24.org>2023-10-04 17:46:35 +0000
commit2bac2c5e41de98f9aa50fbf69060a3bdef54f61f (patch)
tree2bae21bca9eec60c0439039c305e2716cc4d9697 /lib/PublicInbox/LeiAuth.pm
parent830ff2d76f38fed230eaa8fb8fc5a5e83917562a (diff)
downloadpublic-inbox-2bac2c5e41de98f9aa50fbf69060a3bdef54f61f.tar.gz
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)
Diffstat (limited to 'lib/PublicInbox/LeiAuth.pm')
-rw-r--r--lib/PublicInbox/LeiAuth.pm4
1 files changed, 2 insertions, 2 deletions
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__ }