-sub check_read {
- my ($self) = @_;
- if (index($self->{rbuf}, "\n") >= 0) {
- # Force another read if there is a pipelined request.
- # We don't know if the socket has anything for us to read,
- # and we must double-check again by the time the timer fires
- # in case we really did dispatch a read event and started
- # another long response.
- push @$nextq, $self;
- $nextt ||= PublicInbox::EvCleanup::asap(*next_tick);
- } else {
- # no pipelined requests available, let the kernel know
- # to wake us up if there's more
- $self->watch_read(1); # PublicInbox::DS::watch_read
- }
-}
-
-sub not_idle_long ($$) {
- my ($self, $now) = @_;
- my $sock = $self->{sock} or return;
- defined(my $fd = fileno($sock)) or return;
- my $ary = $EXPMAP->{$fd} or return;
- my $exp_at = $ary->[0] + $EXPTIME;
- $exp_at > $now;
+ # maybe there's more pipelined data, or we'll have
+ # to register it for socket-readiness notifications
+ $self->requeue unless $self->{wbuf};