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. --- public-inbox-nntpd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public-inbox-nntpd') diff --git a/public-inbox-nntpd b/public-inbox-nntpd index 4c156080..70bab46f 100644 --- a/public-inbox-nntpd +++ b/public-inbox-nntpd @@ -205,7 +205,7 @@ sub worker_quit { foreach my $s (values %$dmap) { next unless ref($s) eq 'PublicInbox::NNTP'; - if ($s->{write_buf_size} || $s->{rbuf}) { + if ($s->busy) { ++$n; } else { $s->close; -- cgit v1.2.3-24-ge0c7