From 812b9991ac21cbba7d9e60cb5a9e06a9fb69351d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 24 Sep 2015 03:37:18 +0000 Subject: nntpd: move busy check to NNTP package This is better encapsulated and hopefully more readable. While we're at it, check for being inside a long response, too. --- lib/PublicInbox/NNTP.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/PublicInbox/NNTP.pm') diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index 0d0de976..52d6a64c 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -919,4 +919,9 @@ sub watch_read { $rv; } +sub busy () { + my ($self) = @_; + ($self->{rbuf} ne '' || $self->{long_res} || $self->{write_buf_size}); +} + 1; -- cgit v1.2.3-24-ge0c7