about summary refs log tree commit homepage
path: root/lib/PublicInbox/HTTP.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/HTTP.pm')
-rw-r--r--lib/PublicInbox/HTTP.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index 071251c6..32537153 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -280,12 +280,12 @@ sub getline_pull {
                 }
 
                 if ($self->{sock}) {
-                        my $wbuf = $self->{wbuf} //= [];
-                        push @$wbuf, \&getline_pull;
+                        # autovivify wbuf
+                        my $new_size = push(@{$self->{wbuf}}, \&getline_pull);
 
                         # wbuf may be populated by {chunked,identity}_write()
                         # above, no need to rearm if so:
-                        $self->requeue if scalar(@$wbuf) == 1;
+                        $self->requeue if $new_size == 1;
                         return; # likely
                 }
         } elsif ($@) {