]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
v2/ui: retry DB reopens in a few more places
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index f000a950e48b2754a54fb8477ace9de34c106712..54a6eb32e184f71b8350454292dc4dbf06534314 100644 (file)
@@ -254,9 +254,11 @@ sub msg_by_mid ($$;$) {
        my ($self, $mid, $ref) = @_;
        my $srch = search($self) or
                        return msg_by_path($self, mid2path($mid), $ref);
-       my $smsg = $srch->lookup_skeleton($mid) or return;
-       $smsg->load_expand;
-       msg_by_smsg($self, $smsg, $ref);
+       my $smsg;
+       $srch->retry_reopen(sub {
+               $smsg = $srch->lookup_skeleton($mid) and $smsg->load_expand;
+       });
+       $smsg ? msg_by_smsg($self, $smsg, $ref) : undef;
 }
 
 1;