diff options
author | Eric Wong <e@80x24.org> | 2021-01-13 19:06:26 -1200 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-15 00:19:12 +0000 |
commit | 9ecd339fc32ff9c6b8ddcc98a992f5bcc682077e (patch) | |
tree | 2927ec2d0bf49f890eb1a73f95933201d2656547 | |
parent | 231bd779ab46d47f221d0021c7641f128e936527 (diff) | |
download | public-inbox-9ecd339fc32ff9c6b8ddcc98a992f5bcc682077e.tar.gz |
We can place the IO/GLOB ref directly into $self, here.
-rw-r--r-- | lib/PublicInbox/LEI.pm | 7 |
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); |