This fixes the inability to fallback to WwwCoderepo on cgit 404s
with generic PSGI servers. Unfortunately, this doesn't seem to
get tested with generic PSGI tests, and doesn't happen on
public-inbox-httpd, obviously.
if (ref($r) ne 'ARRAY' || scalar(@$r) == 3) { # error
if ($async) { # calls rpipe->close && ->event_step
$async->close; # PublicInbox::HTTPD::Async::close
- } else {
- $self->{rpipe}->close;
+ } else { # generic PSGI:
+ delete($self->{rpipe})->close;
event_step($self);
+ waitpid_err($self);
}
if (ref($r) eq 'ARRAY') { # error
$wcb->($r)