From 21235aaf76ff3b5d7f400b65c8aa793f6b6a002c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 11 Jan 2017 04:12:27 +0000 Subject: qspawn|httpd/async: improve and fix out-of-date comments --- lib/PublicInbox/HTTPD/Async.pm | 1 + lib/PublicInbox/Qspawn.pm | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index a8488b6b..a9a9573b 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -23,6 +23,7 @@ sub new { $self; } +# fires after pending writes are complete: sub restart_read_cb ($) { my ($self) = @_; sub { $self->watch_read(1) } diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm index 3247cd07..96fbf38d 100644 --- a/lib/PublicInbox/Qspawn.pm +++ b/lib/PublicInbox/Qspawn.pm @@ -86,8 +86,6 @@ sub psgi_return { $fh->close if $fh; # async-only }; - # Danga::Socket users, we queue up the read_enable callback to - # fire after pending writes are complete: my $buf = ''; my $rd_hdr = sub { my $r = sysread($rpipe, $buf, 1024, length($buf)); @@ -102,7 +100,7 @@ sub psgi_return { my $filter = delete $env->{'qspawn.filter'}; if (scalar(@$r) == 3) { # error if ($async) { - $async->close; # calls rpipe->close + $async->close; # calls rpipe->close and $end } else { $rpipe->close; $end->(); -- cgit v1.2.3-24-ge0c7