diff options
author | Eric Wong <e@80x24.org> | 2019-06-24 02:52:02 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-24 05:26:25 +0000 |
commit | 740d274818d7af9c50c8609a05860817e6aa9680 (patch) | |
tree | 67ffa1c377ea0fd9d998017401f10755e4c52ed8 /lib/PublicInbox/HTTPD/Async.pm | |
parent | 74dc166d18b5586689f21f6032196279e6db4db3 (diff) | |
download | public-inbox-740d274818d7af9c50c8609a05860817e6aa9680.tar.gz |
Merely checking the presence of the {sock} field is enough, and having multiple sources of truth increases confusion and the likelyhood of bugs.
Diffstat (limited to 'lib/PublicInbox/HTTPD/Async.pm')
-rw-r--r-- | lib/PublicInbox/HTTPD/Async.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index 604627ab..261a01e0 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -45,7 +45,7 @@ sub main_cb ($$$) { my $r = sysread($self->{sock}, $$bref, 8192); if ($r) { $fh->write($$bref); - unless ($http->{closed}) { # PublicInbox::DS sets this + if ($http->{sock}) { # !closed if (scalar @{$http->{wbuf}}) { $self->watch_read(0); $http->write(restart_read_cb($self)); |