With our internal use, this wasn't really an issue yet - the only current impl had a try / catch / exception around it.
Commit 1568353 from Mark Miller in branch 'dev/trunk'
[ https://svn.apache.org/r1568353 ]
SOLR-5731: In ConnectionManager, we should catch and only log exceptions from BeforeReconnect.
Commit 1568354 from Mark Miller in branch 'dev/trunk'
[ https://svn.apache.org/r1568354 ]
SOLR-5731: The actual catch and loging.
Commit 1568355 from Mark Miller in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1568355 ]
4x commit has both 5x commits. I also move the call to set local leader flags to off from afterReconnect to beforeReconnect. It should not matter, in both cases it's before the new elections begin, but I think it fits better in beforeReconnect.