]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
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>
Wed, 11 Jan 2017 04:13:19 +0000 (04:13 +0000)
lib/PublicInbox/HTTPD/Async.pm
lib/PublicInbox/Qspawn.pm

index 2bd190809cc582a144d1080a590f901fabee2fb0..d3de44295f849fbb9a562526b05506c80e3c0e2c 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 eead5a5baa1f4dbe5cedf9d269431b7f67ea2f7f..cd23ab7fe06e76e7d1ad2121b50d581cd28ef9ef 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->();