about summary refs log tree commit homepage
path: root/lib/PublicInbox/Feed.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-30 02:35:14 +0000
committerEric Wong <e@80x24.org>2016-06-30 07:13:06 +0000
commit5422a844b7384c32b3532d128e15e0b50d24435b (patch)
treebc279f571dace8a3205c4d2e4e7de56f134f4817 /lib/PublicInbox/Feed.pm
parent5c5dfb7d5558ff248477fa57aef08e2a8bbd9800 (diff)
downloadpublic-inbox-5422a844b7384c32b3532d128e15e0b50d24435b.tar.gz
This allows us the HTTP server to react to backpressure
from slow clients when writing.  As a side effect, this
also makes it easier for us to maintain a consistent
header/footer across our HTML.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r--lib/PublicInbox/Feed.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 8e233061..36802fa1 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -168,12 +168,13 @@ sub emit_html_index {
 sub emit_index_nosrch {
         my ($ctx, $state) = @_;
         my $ibx = $ctx->{-inbox};
+        my $fh = $state->{fh};
         my (undef, $last) = each_recent_blob($ctx, sub {
                 my ($path, $commit, $ts, $u, $subj) = @_;
                 $state->{first} ||= $commit;
 
                 my $mime = do_cat_mail($ibx, $path) or return 0;
-                PublicInbox::View::index_entry($mime, 0, $state);
+                $fh->write(PublicInbox::View::index_entry($mime, $state));
                 1;
         });
         $last;