]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
ds: shutdn_tls_step clobbers {wbuf} early
authorEric Wong <e@80x24.org>
Tue, 17 Jun 2025 00:13:34 +0000 (00:13 +0000)
committerEric Wong <e@80x24.org>
Wed, 18 Jun 2025 11:04:29 +0000 (11:04 +0000)
Instead of prepending to {wbuf} and preserving tmpio objects
and/or other coderefs, clobber it early since we don't keep
sockets after shutting down TLS.  This ought to fix the `BUG:
ep_mod GLOB=GLOB(...): no such file or directory' (ENOENT)
errors on EPOLL_CTL_MOD when a client shuts down the connection
while serving large HTTPS responses.

lib/PublicInbox/DS.pm

index ad01ffc8cd0b4546019fdb78808f5d2569578ffc..38b3635152bc2430a98b7e5d4580297a990014e9 100644 (file)
@@ -619,7 +619,7 @@ sub shutdn_tls_step ($) {
                                $! != EAGAIN;
        my $ev = PublicInbox::TLS::epollbit() or return ds_close($self);
        epwait $sock, $ev | EPOLLONESHOT;
-       unshift @{$self->{wbuf}}, \&shutdn_tls_step; # autovivifies
+       @{$self->{wbuf}} = (\&shutdn_tls_step); # autovivifies
 }
 
 # don't bother with shutdown($sock, 2), we don't fork+exec w/o CLOEXEC