diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/GitHTTPBackend.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index 18194441..58e75cde 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -210,7 +210,12 @@ sub serve_smart { my $r = $rd_hdr->() or return; $rd_hdr = undef; if (scalar(@$r) == 3) { # error: - $async->close if $async; + if ($async) { + $async->close; # calls rpipe->close + } else { + $rpipe->close; + $end->(); + } return $res->($r); } if ($async) { |