]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStream.pm
www_stream: use DESTROY to cleanup temporary gits
[public-inbox.git] / lib / PublicInbox / WwwStream.pm
index 77b6f9c29e4ec675120cd2b47f5c6f003abb8e2f..16442d51a75fc1cac0b26332fbe9a8fad49d3e2b 100644 (file)
@@ -220,4 +220,9 @@ sub html_init {
        print { $ctx->zfh } html_top($ctx);
 }
 
+sub DESTROY {
+       my ($ctx) = @_;
+       $ctx->{git}->cleanup if $ctx->{git} && $ctx->{git}->{-tmp};
+}
+
 1;