about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-12-22 08:00:26 +0000
committerEric Wong <e@80x24.org>2016-12-22 08:13:57 +0000
commita3481323fcce58b84d6209d928e7091cd8e69db5 (patch)
tree28e7e0342e99b382a1c10f50a8fabf15dcb6ff13 /lib
parent15e14f11af0b9919f11e0c186b365ae0154e7e77 (diff)
downloadpublic-inbox-a3481323fcce58b84d6209d928e7091cd8e69db5.tar.gz
We call lookup_mail all over the place, be sure we can handle
database modifications in those cases.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Search.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index d4f6f77a..b59430d8 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -289,8 +289,10 @@ sub lookup_message {
 
 sub lookup_mail { # no ghosts!
         my ($self, $mid) = @_;
-        my $smsg = lookup_message($self, $mid) or return;
-        PublicInbox::SearchMsg->load_doc($smsg->{doc});
+        retry_reopen($self, sub {
+                my $smsg = lookup_message($self, $mid) or return;
+                PublicInbox::SearchMsg->load_doc($smsg->{doc});
+        });
 }
 
 sub find_unique_doc_id {