lib/PublicInbox/GitAsyncCat.pm | 11 ++--------- diff --git a/lib/PublicInbox/GitAsyncCat.pm b/lib/PublicInbox/GitAsyncCat.pm index 0b777204a7ccfe021fe102c3218c2af4de5565ce..e618d366a8bc31dbbcafd29b702160787d267fcb 100644 --- a/lib/PublicInbox/GitAsyncCat.pm +++ b/lib/PublicInbox/GitAsyncCat.pm @@ -24,20 +24,13 @@ } sub event_step { my ($self) = @_; - my $git = $self->{git} or return; # ->close-ed + my $git = $self->{git}; + return $self->close if ($git->{in} // 0) != ($self->{sock} // 1); my $inflight = $git->{inflight}; if ($inflight && @$inflight) { $git->cat_async_step($inflight); $self->requeue if @$inflight || exists $git->{cat_rbuf}; } -} - -sub close { - my ($self) = @_; - if (my $git = delete $self->{git}) { - delete $git->{async_cat}; - } - $self->SUPER::close; # PublicInbox::DS::close } sub git_async_cat ($$$$) {