about summary refs log tree commit homepage
path: root/lib/PublicInbox/Mbox.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-30 23:43:50 +0000
committerEric Wong <e@yhbt.net>2020-08-01 00:38:13 +0000
commit0821af5f21fdb083020ae2e3e79e4227ef59cd4f (patch)
tree8ecc87f31893549031b94331e9ed02a80ac5bed0 /lib/PublicInbox/Mbox.pm
parentf60f934cfe1e7a06c853741fbabbbbe3a9a747a4 (diff)
downloadpublic-inbox-0821af5f21fdb083020ae2e3e79e4227ef59cd4f.tar.gz
Although the ->async_next method does not take $self as
a receiver, but rather a PublicInbox::HTTP object, we may
still retrieve it to be called with the HTTP object via
UNIVERSAL->can.
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r--lib/PublicInbox/Mbox.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm
index 115321c6..fc83a893 100644
--- a/lib/PublicInbox/Mbox.pm
+++ b/lib/PublicInbox/Mbox.pm
@@ -29,7 +29,7 @@ sub getline {
         }
 }
 
-# called by PublicInbox::DS::write
+# called by PublicInbox::DS::write after http->next_step
 sub async_next {
         my ($http) = @_; # PublicInbox::HTTP
         my $ctx = $http->{forward} or return; # client aborted
@@ -40,7 +40,7 @@ sub async_next {
         warn "E: $@" if $@;
 }
 
-sub async_eml { # ->{async_eml} for async_blob_cb
+sub async_eml { # for async_blob_cb
         my ($ctx, $eml) = @_;
         my $smsg = delete $ctx->{smsg};
         # next message
@@ -87,7 +87,7 @@ sub emit_raw {
         my $smsg = $ctx->{smsg} = $over->next_by_mid(@$mip) or return;
         my $res_hdr = res_hdr($ctx, $smsg->{subject});
         bless $ctx, __PACKAGE__;
-        $ctx->psgi_response(200, $res_hdr, \&async_next, \&async_eml);
+        $ctx->psgi_response(200, $res_hdr);
 }
 
 sub msg_hdr ($$;$) {