about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiExternal.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-31 22:28:16 -1000
committerEric Wong <e@80x24.org>2021-02-01 11:38:10 +0000
commit21ce1a28915374297829bd05feda0cea52adb324 (patch)
treef564e868b9e3396ca60e9c3897fbaa467cb8f3b2 /lib/PublicInbox/LeiExternal.pm
parentdbf555ee5906e5c778941ee850a88640a026b0ea (diff)
downloadpublic-inbox-21ce1a28915374297829bd05feda0cea52adb324.tar.gz
It doesn't save us any code, and the action-at-a-distance
element was making it confusing to track down actual problems.
Another potential problem was keeping references alive too long.

So do like we would a C100K server and check every write
while still ensuring lei(1) exit with a proper SIGPIPE
iff needed.
Diffstat (limited to 'lib/PublicInbox/LeiExternal.pm')
-rw-r--r--lib/PublicInbox/LeiExternal.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiExternal.pm b/lib/PublicInbox/LeiExternal.pm
index bf07c41c..b1176824 100644
--- a/lib/PublicInbox/LeiExternal.pm
+++ b/lib/PublicInbox/LeiExternal.pm
@@ -31,11 +31,10 @@ sub _externals_each {
 
 sub lei_ls_external {
         my ($self, @argv) = @_;
-        my $out = $self->{1};
         my ($OFS, $ORS) = $self->{opt}->{z} ? ("\0", "\0\0") : (" ", "\n");
         $self->_externals_each(sub {
                 my ($loc, $boost_val) = @_;
-                print $out $loc, $OFS, 'boost=', $boost_val, $ORS;
+                $self->out($loc, $OFS, 'boost=', $boost_val, $ORS);
         });
 }