about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-10-16 06:59:32 +0000
committerEric Wong <e@80x24.org>2020-10-16 17:15:23 +0000
commitaaae95b1f3be705daf815b490ec556bdf19e0538 (patch)
treeb47d6c0b23846c2f00b6ec86f37edff82e256d97 /lib/PublicInbox
parentc0174089f48d081bb84ce776d5b6ee0bf19a4fa1 (diff)
downloadpublic-inbox-aaae95b1f3be705daf815b490ec556bdf19e0538.tar.gz
git: ensure ->destroy clobbers check_async read buffer
It's currently not a problem as ->destroy doesn't
happen for no reason, we'll need to ensure future uses of
->destroy correctly discard the check_async buffer.
Diffstat (limited to 'lib/PublicInbox')
-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 2323cecc..449223ec 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -239,7 +239,7 @@ sub check_async_step ($$) {
         my ($self, $inflight_c) = @_;
         die 'BUG: inflight empty or odd' if scalar(@$inflight_c) < 3;
         my ($req, $cb, $arg) = splice(@$inflight_c, 0, 3);
-        my $rbuf = delete($self->{rbuf_c}) // \(my $new = '');
+        my $rbuf = delete($self->{chk_rbuf}) // \(my $new = '');
         chomp(my $line = my_readline($self->{in_c}, $rbuf));
         my ($hex, $type, $size) = split(/ /, $line);
 
@@ -253,7 +253,7 @@ sub check_async_step ($$) {
         }
         eval { $cb->($hex, $type, $size, $arg, $self) };
         warn "E: check($req) $@\n" if $@;
-        $self->{rbuf_c} = $rbuf if $$rbuf ne '';
+        $self->{chk_rbuf} = $rbuf if $$rbuf ne '';
 }
 
 sub check_async_wait ($) {