From c6e35192bf5aa6b195e210674f9a30d189ab7457 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 19 Sep 2015 02:03:29 +0000 Subject: nntp: use write_buf_size instead write_buf It is shorter code and probably faster than checking an array. --- lib/PublicInbox/NNTP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index f1aaed48..807b49f8 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -514,7 +514,7 @@ use constant MSG_MORE => ($^O eq 'linux') ? 0x8000 : 0; sub do_more { my ($self, $data) = @_; - if (MSG_MORE && !scalar @{$self->{write_buf}}) { + if (MSG_MORE && !$self->{write_buf_size}) { my $n = send($self->{sock}, $data, MSG_MORE); if (defined $n) { my $dlen = bytes::length($data); -- cgit v1.2.3-24-ge0c7