From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D5B051F5AE; Mon, 6 Jul 2020 19:48:47 +0000 (UTC) Date: Mon, 6 Jul 2020 19:48:46 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH v2] git_async_cat: unref pipes on EOF from git->cleanup Message-ID: <20200706194846.GA28969@dcvr> References: <20200705225045.29291-1-e@yhbt.net> <20200706061102.GA15566@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200706061102.GA15566@dcvr> List-Id: Will also squash this in because ->requeue could cause us to reenter event_step after ->close. diff --git a/lib/PublicInbox/GitAsyncCat.pm b/lib/PublicInbox/GitAsyncCat.pm index e79f416d..e618d366 100644 --- a/lib/PublicInbox/GitAsyncCat.pm +++ b/lib/PublicInbox/GitAsyncCat.pm @@ -25,10 +25,10 @@ sub _add { sub event_step { my ($self) = @_; my $git = $self->{git}; - return $self->close if ($git->{in} // 0) != $self->{sock}; + 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}; } }