]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: cleanup processes when done
authorEric Wong <e@80x24.org>
Fri, 11 Jan 2019 02:47:57 +0000 (02:47 +0000)
committerEric Wong <e@80x24.org>
Fri, 11 Jan 2019 03:58:03 +0000 (03:58 +0000)
Otherwise, Perl may exit successfully when a failure code
is desired.

lib/PublicInbox/V2Writable.pm

index 970244eb433944cb4ebecb064146002fc427667c..ec28e510706d92c836dd48bbff8fbd4d3179fc94 100644 (file)
@@ -291,6 +291,7 @@ sub purge_oids {
                my $git = PublicInbox::Git->new($git_dir);
                my $im = $self->import_init($git, 0, 1);
                $purges->[$i] = $im->purge_oids($purge);
+               $im->done;
        }
        $purges;
 }
@@ -499,6 +500,7 @@ sub done {
        delete $self->{bnote};
        $self->{transact_bytes} = 0;
        $self->lock_release if $parts;
+       $self->{-inbox}->git->cleanup;
 }
 
 sub git_init {