about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-16 14:15:20 -0600
committerEric Wong <e@80x24.org>2021-09-16 20:17:16 +0000
commit5ee47e3bb465db1c5bf0774700971374edd09bbd (patch)
treea99e2890970647c1dafc17d8d090fa1a520f3d93 /lib
parent77398fa98962fa5c1ab9eb15894ec5b19d0a386e (diff)
downloadpublic-inbox-5ee47e3bb465db1c5bf0774700971374edd09bbd.tar.gz
Since some commands access both Maildirs and IMAP/NNTP servers
at the same time, LeiPmdir may see the same lei->{auth} and
lei->{net} objects as the sibling LeiInput-based workers.
Delete those at fork and do not attempt to do authentication in
those cases, since "net_merge_continue" will not be a registered
op and cause PktOp to fail even if authentication /can/ work
from a LeiPmdir worker.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LeiPmdir.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiPmdir.pm b/lib/PublicInbox/LeiPmdir.pm
index 59cf886e..23bccb4f 100644
--- a/lib/PublicInbox/LeiPmdir.pm
+++ b/lib/PublicInbox/LeiPmdir.pm
@@ -32,7 +32,8 @@ sub new {
 sub ipc_atfork_child {
         my ($self) = @_;
         my $ipt = $self->{ipt} // die 'BUG: no self->{ipt}';
-        $ipt->{lei} = $self->{lei};
+        my $lei = $ipt->{lei} = $self->{lei};
+        delete @$lei{qw(auth net)}; # no network access in this worker
         $ipt->ipc_atfork_child; # calls _lei_atfork_child;
 }