]> Sergey Matveev's repositories - public-inbox.git/commitdiff
qspawn|httpd/async: improve and fix out-of-date comments
authorEric Wong <e@80x24.org>
Wed, 11 Jan 2017 04:12:27 +0000 (04:12 +0000)
committerEric Wong <e@80x24.org>
Tue, 22 Jan 2019 03:40:13 +0000 (03:40 +0000)
lib/PublicInbox/HTTPD/Async.pm
lib/PublicInbox/Qspawn.pm

index a8488b6be4ff0568a0c52561290d430a468f3b81..a9a9573b28cf4609f1880ece72034cb3e6e7aa3c 100644 (file)
@@ -23,6 +23,7 @@ sub new {
        $self;
 }
 
+# fires after pending writes are complete:
 sub restart_read_cb ($) {
        my ($self) = @_;
        sub { $self->watch_read(1) }
index 3247cd078cba71aaaa058798cff4840309ca7932..96fbf38d1cbda2e4c6c939757969c0b90d7b7032 100644 (file)
@@ -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->();