]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LEI.pm
lei: do not access {sock} after SIGPIPE
[public-inbox.git] / lib / PublicInbox / LEI.pm
index f9d24f29c87d0dfc82056c8b767b64ca05c8a46b..78b49a3bc1afca5d837884cf0cf6ac1a24b5fa77 100644 (file)
@@ -202,7 +202,7 @@ our %CMD = ( # sorted in order of importance/use:
 
 'mail-diff' => [ '--stdin|LOCATION...', 'diff the contents of emails',
        'stdin|', # /|\z/ must be first for lone dash
-       qw(verbose|v+ color:s no-color raw-header),
+       qw(verbose|v+ in-format|F=s color:s no-color raw-header),
        @diff_opt, @net_opt, @c_opt ],
 
 'add-external' => [ 'LOCATION',
@@ -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;