From 8dc0811343ca1d524e46bd30d3c11dcd728fe911 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 Oct 2023 06:43:50 +0000 Subject: net_reader: process title reflects NNTP article This matches the IMAP behavior with UIDs. While we're in the area, cut down on LoC a bit and reduce the scope of the $art variable. --- lib/PublicInbox/NetReader.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/PublicInbox/NetReader.pm') diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm index 2d6cb0d6..76fd3892 100644 --- a/lib/PublicInbox/NetReader.pm +++ b/lib/PublicInbox/NetReader.pm @@ -788,14 +788,12 @@ sub _nntp_fetch_all ($$$) { $beg = $num_a if defined($num_a) && $num_a > $beg && $num_a <= $end; $end = $num_b if defined($num_b) && $num_b >= $beg && $num_b < $end; $end = $beg if defined($num_a) && !defined($num_b); - my ($err, $art, $last_art, $kw); # kw stays undef, no keywords in NNTP - unless ($self->{quiet}) { - warn "# $uri fetching ARTICLE $beg..$end\n"; - } + my ($err, $last_art, $kw); # kw stays undef, no keywords in NNTP + warn "# $uri fetching ARTICLE $beg..$end\n" if !$self->{quiet}; my $n = $self->{max_batch}; - for ($beg..$end) { + for my $art ($beg..$end) { last if $self->{quit}; - $art = $_; + local $0 = "#$art $group $sec"; if (--$n < 0) { run_commit_cb($self); $itrk->update_last(0, $last_art) if $itrk; -- cgit v1.2.3-24-ge0c7