]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
www: mbox: break out of loop on exceptions
authorEric Wong <e@80x24.org>
Tue, 11 Feb 2025 03:55:35 +0000 (03:55 +0000)
committerEric Wong <e@80x24.org>
Tue, 11 Feb 2025 19:08:16 +0000 (19:08 +0000)
In case async_mset fails due to resource limitations, ensure we
stop trying to make expensive search queries ASAP.

lib/PublicInbox/Mbox.pm

index 17893a0900ce1f3765294507778e515225a10932..a5974a3995f968881f611cac371d030dbe079487 100644 (file)
@@ -181,6 +181,7 @@ my $refill_ids_cb = sub { # async_mset cb
        $http = undef unless $ctx->{-really_async};
        if ($err) {
                warn "E: $err";
+               $ctx->{-mbox_done} = 1;
                $ctx->close if $http; # our async httpd
                return;
        }