From: Eric Wong Date: Tue, 17 Jun 2025 00:13:34 +0000 (+0000) Subject: ds: shutdn_tls_step clobbers {wbuf} early X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7aaea70446ec63c6b46b64660883f2d531674cd;p=thirdparty%2Fpublic-inbox.git ds: shutdn_tls_step clobbers {wbuf} early 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. --- diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index ad01ffc8c..38b363515 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -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