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, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index 856b8959..b8912950 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -30,10 +30,8 @@ use constant {
 use Errno qw(EAGAIN);
 
 my $pipelineq = [];
-my $pipet;
 sub process_pipelineq () {
         my $q = $pipelineq;
-        $pipet = undef;
         $pipelineq = [];
         foreach (@$q) {
                 next unless $_->{sock};
@@ -238,8 +236,8 @@ sub next_request ($) {
         my ($self) = @_;
         if ($self->{rbuf}) {
                 # avoid recursion for pipelined requests
+                PublicInbox::DS::requeue(\&process_pipelineq) if !@$pipelineq;
                 push @$pipelineq, $self;
-                $pipet ||= PublicInbox::EvCleanup::asap(*process_pipelineq);
         } else { # wait for next request
                 $self->requeue;
         }
@@ -269,7 +267,7 @@ sub getline_cb ($$$) {
                                 if ($self->{wbuf}) {
                                         $self->write($next);
                                 } else {
-                                        PublicInbox::EvCleanup::asap($next);
+                                        PublicInbox::DS::requeue($next);
                                 }
                                 return;
                         }