about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/LEI.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index a8fea16d..9786e7ac 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -678,11 +678,8 @@ sub accept_dispatch { # Listener {post_accept} callback
                 my $i = 0;
                 for my $rdr (qw(<&= >&= >&=)) {
                         my $fd = shift(@fds);
-                        if (open(my $fh, $rdr, $fd)) {
-                                $self->{$i++} = $fh;
-                                next;
-                        }
-                        return send($sock, "open($rdr$fd) (FD=$i): $!", MSG_EOR);
+                        open($self->{$i++}, $rdr, $fd) and next;
+                        send($sock, "open($rdr$fd) (FD=$i): $!", MSG_EOR);
                 }
         } else {
                 return send($sock, "recv_cmd failed: $!", MSG_EOR);