about summary refs log tree commit homepage
path: root/lib/PublicInbox/HTTPD/Async.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-10 01:33:30 +0000
committerEric Wong <e@80x24.org>2019-06-10 05:05:15 +0000
commit42bb1574bf35a18f037d4ca8b0e6696192d301df (patch)
tree14a78099c015262e38323d8a0ca82e64bf7bebc4 /lib/PublicInbox/HTTPD/Async.pm
parentc44825f8b2f3d57f6aca29d75516db8712261954 (diff)
downloadpublic-inbox-42bb1574bf35a18f037d4ca8b0e6696192d301df.tar.gz
Keeping track of write_buf_size was redundant and pointless when
we can simply check the number of elements in the buffer array.
Multiple sources of truth leads to confusion; confusion leads to
bugs.

Finally, rename the prefixes to 'wbuf' to ensure we loudly
(instead of silently) break any external dependencies being
ported over from Danga::Socket, as further changes are pending.
Diffstat (limited to 'lib/PublicInbox/HTTPD/Async.pm')
-rw-r--r--lib/PublicInbox/HTTPD/Async.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm
index dbe8a84a..60701085 100644
--- a/lib/PublicInbox/HTTPD/Async.pm
+++ b/lib/PublicInbox/HTTPD/Async.pm
@@ -46,7 +46,7 @@ sub main_cb ($$$) {
                 if ($r) {
                         $fh->write($$bref);
                         unless ($http->{closed}) { # PublicInbox::DS sets this
-                                if ($http->{write_buf_size}) {
+                                if (scalar @{$http->{wbuf}}) {
                                         $self->watch_read(0);
                                         $http->write(restart_read_cb($self));
                                 }