about summary refs log tree commit homepage
path: root/lib/PublicInbox/MboxGz.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/MboxGz.pm')
-rw-r--r--lib/PublicInbox/MboxGz.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/MboxGz.pm b/lib/PublicInbox/MboxGz.pm
index 533d2ff1..864d701e 100644
--- a/lib/PublicInbox/MboxGz.pm
+++ b/lib/PublicInbox/MboxGz.pm
@@ -13,8 +13,8 @@ sub async_next ($) {
         my ($http) = @_; # PublicInbox::HTTP
         my $ctx = $http->{forward} or return;
         eval {
-                $ctx->{smsg} = $ctx->{cb}->($ctx) or return $ctx->close;
-                $ctx->smsg_blob($ctx->{smsg});
+                my $smsg = $ctx->{cb}->($ctx, $http) // return $ctx->close;
+                $smsg and $ctx->smsg_blob($ctx->{smsg} = $smsg);
         };
         warn "E: $@" if $@;
 }