about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-01-11 04:12:27 +0000
committerEric Wong <e@80x24.org>2017-01-11 04:13:19 +0000
commit8797a0b79d643824d05d0bd1a2b6e400081b855d (patch)
tree4fbf315f311b0c1d8c8a7f170ccf3ac23e65cded
parent33362430ea03e5877ce1d17bbe1da830dcebea3e (diff)
downloadpublic-inbox-8797a0b79d643824d05d0bd1a2b6e400081b855d.tar.gz
-rw-r--r--lib/PublicInbox/HTTPD/Async.pm1
-rw-r--r--lib/PublicInbox/Qspawn.pm4
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm
index 2bd19080..d3de4429 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 eead5a5b..cd23ab7f 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->();