From a29d72521f20576916e4c407263566cfa972416b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 28 Sep 2021 23:11:04 +0000 Subject: www: do not bump {over} refcnt on long responses SQLite files may be replaced or removed by admins while generating a large threads or mailbox responses. Ensure we don't hold onto DBI handles and associated file descriptors past their cleanup. --- lib/PublicInbox/GzipFilter.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/PublicInbox/GzipFilter.pm') diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm index c50c26c5..624c2ed3 100644 --- a/lib/PublicInbox/GzipFilter.pm +++ b/lib/PublicInbox/GzipFilter.pm @@ -84,6 +84,12 @@ sub gzip_or_die () { $gz; } +sub gone { # what: search/over/mm + my ($ctx, $what) = @_; + warn "W: `$ctx->{ibx}->{name}' $what went away unexpectedly\n"; + undef; +} + # for GetlineBody (via Qspawn) when NOT using $env->{'pi-httpd.async'} # Also used for ->getline callbacks sub translate ($$) { -- cgit v1.2.3-24-ge0c7