diff options
author | Eric Wong <e@80x24.org> | 2022-10-01 15:52:50 -0300 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-10-01 23:02:18 +0000 |
commit | ac22adc97342323e056bb36f9434458cc822e7d9 (patch) | |
tree | f6d3ac9563a203668e3a57b97085335035b12b89 /lib/PublicInbox/ViewVCS.pm | |
parent | fa04201baae9d1043e37cf8ef4e5a33fdd0498ff (diff) | |
download | public-inbox-ac22adc97342323e056bb36f9434458cc822e7d9.tar.gz |
Relying on a timer to handle cleanup in f9ac22a4b485 was sub-optimal since the delay could prove expensive under heavy traffic. So rely on ->DESTROY instead since we we no longer hold reference cycles by the time the show_blob callback executes. Fixes: f9ac22a4b485 ("git_async_cat: automatically cleanup temporary gits")
Diffstat (limited to 'lib/PublicInbox/ViewVCS.pm')
-rw-r--r-- | lib/PublicInbox/ViewVCS.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 915cf2c5..b0f58455 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -414,6 +414,7 @@ blob $oid $size bytes $raw_link</pre> EOM } @{$ctx->{-paths}} = ($path, $raw_link); + bless $ctx, 'PublicInbox::WwwStream'; # for DESTROY $ctx->{git} = $git; if ($ctx->{env}->{'pi-httpd.async'}) { ibx_async_cat($ctx, $oid, \&show_blob, $ctx); |