]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/MiscSearch.pm
update copyrights for 2021
[public-inbox.git] / lib / PublicInbox / MiscSearch.pm
index c6ce255fc90ffebe94aba7d2de4619d28ad7ae3c..ead9a2781bb235d6606b0e1bd6b196b4c43dc941 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # read-only counterpart to MiscIdx
@@ -73,6 +73,7 @@ sub misc_enquire_once { # retry_reopen callback
 sub mset {
        my ($self, $qs, $opt) = @_;
        $opt ||= {};
+       reopen($self);
        my $qp = $self->{qp} //= mi_qp_new($self);
        $qs = 'type:inbox' if $qs eq '';
        my $qr = $qp->parse_query($qs, $PublicInbox::Search::QP_FLAGS);
@@ -184,4 +185,7 @@ sub nntpd_cache_load {
        retry_reopen($self, \&_nntpd_cache_load);
 }
 
+no warnings 'once';
+*reopen = \&PublicInbox::Search::reopen;
+
 1;