]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/MiscSearch.pm
miscsearch: take reopen from Search and use it
[public-inbox.git] / lib / PublicInbox / MiscSearch.pm
index c6ce255fc90ffebe94aba7d2de4619d28ad7ae3c..6683d5644379129fdb976fa56c187a247c99c2f8 100644 (file)
@@ -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;