From: Eric Wong Date: Wed, 28 Apr 2021 07:51:59 +0000 (+0000) Subject: lei-daemon: note FD count mismatch to client X-Git-Tag: v1.7.0~732 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=89e75b356ba23eb3fea488a86d4850ae486a32c6;p=public-inbox.git lei-daemon: note FD count mismatch to client This should help in some error diagnostics --- 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);