diff options
author | Eric Wong <e@80x24.org> | 2016-07-09 04:51:36 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-09 04:52:11 +0000 |
commit | acd3a41f52167b8e41cf34ab8164a9dfb5ef9c5c (patch) | |
tree | 018d375ba0fef58a1a75c5558b40cba7c1e0fddb /lib/PublicInbox/HTTPD/Async.pm | |
parent | 2c972f3d70caf99488fff300341450e48be6ebf1 (diff) | |
download | public-inbox-acd3a41f52167b8e41cf34ab8164a9dfb5ef9c5c.tar.gz |
Danga::Socket::close does not clear the write_buf_size field, so it's conceivable we could attempt to queue up data and callbacks we can never flush out.
Diffstat (limited to 'lib/PublicInbox/HTTPD/Async.pm')
-rw-r--r-- | lib/PublicInbox/HTTPD/Async.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index a936d9b5..880cf021 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -41,6 +41,7 @@ sub async_pass { my $r = sysread($self->{sock}, $$bref, 8192); if ($r) { $fh->write($$bref); + return if $io->{closed}; if ($io->{write_buf_size}) { $self->watch_read(0); $io->write($restart_read); # D::S::write |