diff options
author | Eric Wong <e@yhbt.net> | 2020-01-24 09:43:50 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-25 19:20:54 +0000 |
commit | b99e2465205a8f27801066b1e914bd4091406fa2 (patch) | |
tree | 2e9ca66e1c14a2e278c3f9d1606ab6b32a00983e /lib/PublicInbox/WwwStatic.pm | |
parent | 13aee729fa6d49ffb8583af8f780e836f8f7d503 (diff) | |
download | public-inbox-b99e2465205a8f27801066b1e914bd4091406fa2.tar.gz |
The PSGI server needs to account for ->getline failing due to disk failures or truncated files, anyways. So just die() ourselves and let the PSGI server log and drop the client.
Diffstat (limited to 'lib/PublicInbox/WwwStatic.pm')
-rw-r--r-- | lib/PublicInbox/WwwStatic.pm | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/PublicInbox/WwwStatic.pm b/lib/PublicInbox/WwwStatic.pm index 917049bb..e1f536f3 100644 --- a/lib/PublicInbox/WwwStatic.pm +++ b/lib/PublicInbox/WwwStatic.pm @@ -169,16 +169,7 @@ sub getline { return $buf; } my $m = defined $r ? "EOF with $len bytes left" : "read error: $!"; - my $env = $self->{env}; - $env->{'psgi.errors'}->print("$self->{path} $m\n"); - - # drop the client on error - if (my $io = $env->{'psgix.io'}) { - $io->close; # this is likely PublicInbox::DS::close - } else { # for some PSGI servers w/o psgix.io - die "dropping client socket\n"; - } - undef; + die "$self->{path} $m, dropping client socket\n"; } sub close {} # noop, called by PSGI server, just let everything go out-of-scope |