X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FHTTP.pm;h=325371535995ce0a343277bd6fcc603f2cc9493b;hp=071251c632e394302097538bf86ed881473a6fe5;hb=a65ebdc3a1f064bab0cddf64b34caad49f1c4c9c;hpb=8f23c134b6c9bfc9f23b3eed7811082e6d33a84c 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 ($@) {