about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-28 07:51:59 +0000
committerEric Wong <e@80x24.org>2021-04-28 19:30:56 +0000
commit89e75b356ba23eb3fea488a86d4850ae486a32c6 (patch)
tree022446c5df2206232b1341639ea2c68402658544
parent30d74fc31fd98e335e08d09e5ab36e197bd2710c (diff)
downloadpublic-inbox-89e75b356ba23eb3fea488a86d4850ae486a32c6.tar.gz
This should help in some error diagnostics
-rw-r--r--lib/PublicInbox/LEI.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index ef72758c..a949ae3e 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -998,7 +998,7 @@ sub accept_dispatch { # Listener {post_accept} callback
                         open($self->{$i++}, '+<&=', $fd) and next;
                         send($sock, "open(+<&=$fd) (FD=$i): $!", MSG_EOR);
                 }
-                return if scalar(@fds) != 4;
+                $i == 4 or return send($sock, 'not enough FDs='.($i-1), MSG_EOR)
         }
         $self->{2}->autoflush(1); # keep stdout buffered until x_it|DESTROY
         # $ENV_STR = join('', map { "\0$_=$ENV{$_}" } keys %ENV);