diff options
author | Eric Wong <e@80x24.org> | 2016-12-25 08:09:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-25 10:31:59 +0000 |
commit | d0164b3c9048bfd733a82b8fcd53d032e97552cc (patch) | |
tree | eaf79ce19d7d7af7057e88e9cada082069d8c390 /lib | |
parent | f773704937f088c2ef6d5be1038e541284cf5372 (diff) | |
download | public-inbox-d0164b3c9048bfd733a82b8fcd53d032e97552cc.tar.gz |
We only refer to PublicInbox::HTTP objects here, so '$io' was a bad name.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/HTTPD/Async.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index 68514f5a..79951ca6 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -30,10 +30,10 @@ sub restart_read_cb ($) { } sub async_pass { - my ($self, $io, $fh, $bref) = @_; - # In case the client HTTP connection ($io) dies, it + my ($self, $http, $fh, $bref) = @_; + # In case the client HTTP connection ($http) dies, it # will automatically close this ($self) object. - $io->{forward} = $self; + $http->{forward} = $self; $fh->write($$bref); my $restart_read = restart_read_cb($self); weaken($self); @@ -41,10 +41,10 @@ sub async_pass { my $r = sysread($self->{sock}, $$bref, 8192); if ($r) { $fh->write($$bref); - return if $io->{closed}; - if ($io->{write_buf_size}) { + return if $http->{closed}; + if ($http->{write_buf_size}) { $self->watch_read(0); - $io->write($restart_read); # D::S::write + $http->write($restart_read); # D::S::write } # stay in watch_read, but let other clients # get some work done, too. @@ -55,7 +55,7 @@ sub async_pass { # Done! Error handling will happen in $fh->close # called by the {cleanup} handler - $io->{forward} = undef; + $http->{forward} = undef; $self->close; } } |