]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NNTPD.pm
nntpd: skip inboxes w/o {newsgroup}
[public-inbox.git] / lib / PublicInbox / NNTPD.pm
index 953228d0287823ea691e461fb5fae5b86f8c6e99..7f9a1d58558fb963707bd191dfa96107d6dd5dd5 100644 (file)
@@ -38,8 +38,8 @@ sub refresh_groups {
        my $groups = $pi_cfg->{-by_newsgroup}; # filled during each_inbox
        $pi_cfg->each_inbox(sub {
                my ($ibx) = @_;
-               my $ngname = $ibx->{newsgroup};
-               if (defined($ngname) && $ibx->nntp_usable) {
+               my $ngname = $ibx->{newsgroup} // return;
+               if ($ibx->nntp_usable) {
                        # only valid if msgmap and over works
                        # preload to avoid fragmentation:
                        $ibx->description;