about summary refs log tree commit homepage
path: root/lib/PublicInbox/LEI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r--lib/PublicInbox/LEI.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index a9123c6e..473a28a9 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -765,11 +765,10 @@ sub accept_dispatch { # Listener {post_accept} callback
                 return send($sock, 'timed out waiting to recv FDs', MSG_EOR);
         my @fds = $recv_cmd->($sock, my $buf, 4096 * 33); # >MAX_ARG_STRLEN
         if (scalar(@fds) == 4) {
-                my $i = 0;
-                for my $rdr (qw(<&= >&= >&= <&=)) {
+                for my $i (0..3) {
                         my $fd = shift(@fds);
-                        open($self->{$i++}, $rdr, $fd) and next;
-                        send($sock, "open($rdr$fd) (FD=$i): $!", MSG_EOR);
+                        open($self->{$i}, '+<&=', $fd) and next;
+                        send($sock, "open(+<&=$fd) (FD=$i): $!", MSG_EOR);
                 }
         } else {
                 return send($sock, "recv_cmd failed: $!", MSG_EOR);