about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-09-20 03:11:09 +0000
committerEric Wong <e@80x24.org>2015-09-20 03:18:09 +0000
commitf033d9bff75455c6c06ce39de8c60816868f1457 (patch)
treef78f12a5f2d451d64a8c910378be8b5b7e984e79 /lib
parent5dfd4af2452a2fdb28e046e15a44b2d13bdacac0 (diff)
downloadpublic-inbox-f033d9bff75455c6c06ce39de8c60816868f1457.tar.gz
Long responses may leave the buffer momentarily empty,
but we must prevent read events from firing at that point.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/NNTP.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index d513953a..0e910824 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -754,7 +754,9 @@ sub event_err { $_[0]->close }
 sub event_write {
         my ($self) = @_;
         # only continue watching for readability when we are done writing:
-        $self->write(undef) == 1 and $self->watch_read(1);
+        if ($self->write(undef) == 1 && !$self->{long_res}) {
+                $self->watch_read(1);
+        }
 }
 
 sub event_read {