about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiSearch.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-08-16 05:39:33 +0000
committerEric Wong <e@80x24.org>2021-08-16 07:11:04 +0000
commit0a3bcc909a9b023755079ee57f347f33aac75d3e (patch)
treee10a63eb7407fa3dc33582d71428ac1d790cb8d1 /lib/PublicInbox/LeiSearch.pm
parentf6479786aacb8780724d50faf771bf5c7f015daf (diff)
downloadpublic-inbox-0a3bcc909a9b023755079ee57f347f33aac75d3e.tar.gz
Oops, we shouldn't warn on "$@" unless "$@" is truthy.

Fixes: c7bcfe6cd6648ff0 ("lei: diagnostics for /Document \d+ not found/ errors")
Diffstat (limited to 'lib/PublicInbox/LeiSearch.pm')
-rw-r--r--lib/PublicInbox/LeiSearch.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiSearch.pm b/lib/PublicInbox/LeiSearch.pm
index f9e5c8e9..47160ed9 100644
--- a/lib/PublicInbox/LeiSearch.pm
+++ b/lib/PublicInbox/LeiSearch.pm
@@ -64,7 +64,8 @@ sub _xsmsg_vmd { # retry_reopen
                                 %L = (%L, %$x);
                         }
                 };
-                warn "$$ $0 #$num (nshard=$self->{nshard}) $smsg->{blob}: $@";
+                warn "$$ $0 #$num (nshard=$self->{nshard}) $smsg->{blob}: $@"
+                        if $@;
         }
         $smsg->{kw} = [ sort keys %kw ] if scalar(keys(%kw));
         $smsg->{L} = [ sort keys %L ] if scalar(keys(%L));