about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index f000a950..54a6eb32 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -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;