From 5b05a7c7a65a25b938ebf2fdbce0d4b4fadfbd3c Mon Sep 17 00:00:00 2001
From: Eric Wong <e@80x24.org>
Date: Fri, 24 May 2019 01:12:08 +0000
Subject: [PATCH] search: don't log all warnings on retry_reopen

Some users (or bots :P) can trigger horrible queries which
the caller can choose to either log or ignore.  This prevents
horrible queries from ExtMsg from logging confusing "ref: "
messages when $@ is not a Perl reference.
---
 lib/PublicInbox/Search.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index d861cf47..c054a874 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -228,7 +228,9 @@ sub retry_reopen {
 			warn "reopen try #$i on $@\n";
 			reopen($self);
 		} else {
-			warn "ref: ", ref($@), "\n";
+			# let caller decide how to spew, because ExtMsg queries
+			# get wonky and trigger:
+			# "something terrible happened at .../Xapian/Enquire.pm"
 			die;
 		}
 	}
-- 
2.50.0