diff options
author | Eric Wong <e@80x24.org> | 2016-04-06 03:14:40 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-04-06 03:14:40 +0000 |
commit | c7bfc3ca1af27bccc21a43051f756a97da4f2043 (patch) | |
tree | 5f641bcf54fc76726d729ca9b51f76eb67b4c39e /lib/PublicInbox/RepobrowseGitSnapshot.pm | |
parent | aea422e86f56c952813882b5a2836cca0fe4c0a8 (diff) | |
download | public-inbox-c7bfc3ca1af27bccc21a43051f756a97da4f2043.tar.gz |
We should die horribly if fh is missing in some cases due to a fatal bug, do not bug from us and risk losing output data.
Diffstat (limited to 'lib/PublicInbox/RepobrowseGitSnapshot.pm')
-rw-r--r-- | lib/PublicInbox/RepobrowseGitSnapshot.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepobrowseGitSnapshot.pm b/lib/PublicInbox/RepobrowseGitSnapshot.pm index 106d5651..8bd4b0a5 100644 --- a/lib/PublicInbox/RepobrowseGitSnapshot.pm +++ b/lib/PublicInbox/RepobrowseGitSnapshot.pm @@ -112,8 +112,7 @@ sub call_git_snapshot ($$) { # invoked by PublicInbox::RepobrowseBase::call 'ETag', qq("$tree") ]; $req->{fh} = $res->([200, $h]); } - my $fh = $req->{fh} or return; - $fh->write($buf); + $req->{fh}->write($buf); }; if (my $async = $env->{'pi-httpd.async'}) { $req->{rpipe} = $async->($req->{rpipe}, $cb); |