From: Eric Wong Date: Sat, 30 Oct 2021 08:11:40 +0000 (+0000) Subject: lei: do not access {sock} after SIGPIPE X-Git-Tag: v1.7.0~29 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=9cd6f106919076285c3dcc0d48977d6b39c33ede lei: do not access {sock} after SIGPIPE It's possible for this to break out of the event loop if note_sigpipe fires via PktOp in the same iteration. --- diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 96f7c5e3..78b49a3b 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1127,7 +1127,7 @@ sub event_step { local %ENV = %{$self->{env}}; local $current_lei = $self; eval { - my @fds = $recv_cmd->($self->{sock}, my $buf, 4096); + my @fds = $recv_cmd->($self->{sock} // return, my $buf, 4096); if (scalar(@fds) == 1 && !defined($fds[0])) { return if $! == EAGAIN; die "recvmsg: $!" if $! != ECONNRESET;