about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-02-17 20:27:12 +0000
committerEric Wong <e@80x24.org>2022-02-17 21:03:25 +0000
commiteefde9dd2265171e3ed267ff767df5db6d4644e6 (patch)
treec18243d1e07e92336d8f85dbbc551f6daaf5c278
parent2231c8b183be0be5d8a9738a3e417b5c3a09c7c7 (diff)
downloadpublic-inbox-eefde9dd2265171e3ed267ff767df5db6d4644e6.tar.gz
When aborting git processes, we must account for the lack of
inflight requests.
-rw-r--r--lib/PublicInbox/Git.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 54ceaf0b..b2ae75c8 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: GPLv2 or later <https://www.gnu.org/licenses/gpl-2.0.txt>
 #
 # Used to read files from a git repository without excessive forking.
@@ -349,7 +349,7 @@ sub async_abort ($) {
         while (scalar(@{$self->{inflight_c} // []}) ||
                         scalar(@{$self->{inflight} // []})) {
                 for my $c ('', '_c') {
-                        my $q = $self->{"inflight$c"};
+                        my $q = $self->{"inflight$c"} or next;
                         while (@$q) {
                                 my ($req, $cb, $arg) = splice(@$q, 0, 3);
                                 $req = $$req if ref($req);