]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei blob: dclose if already failed
authorEric Wong <e@80x24.org>
Sun, 28 Mar 2021 09:01:15 +0000 (09:01 +0000)
committerEric Wong <e@80x24.org>
Sun, 28 Mar 2021 23:01:36 +0000 (23:01 +0000)
We must close the socket to trigger pager exit if blob
reconstruction fails.  Not sure how to test this in the
test suite...

lib/PublicInbox/LeiBlob.pm

index 97747220a684cffdb520442669397d2ae64206ab..9b4c4f30c7160fb95ef7c050396f3ca666c4ba79 100644 (file)
@@ -19,7 +19,7 @@ sub sol_done_wait { # dwaitpid callback
 
 sub sol_done { # EOF callback for main daemon
        my ($lei) = @_;
-       my $sol = delete $lei->{sol} or return;
+       my $sol = delete $lei->{sol} // return $lei->dclose; # already failed
        $sol->wq_wait_old(\&sol_done_wait, $lei);
 }