bail early on closed

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1443022 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-02-06 15:37:41 +00:00
parent f1d80996fa
commit d5a2081b8b
1 changed files with 5 additions and 0 deletions

View File

@ -1194,6 +1194,11 @@ public final class ZkController {
int retries = 6;
for (int i = 0; i < retries; i++) {
try {
if (isClosed) {
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
"We have been closed");
}
// go straight to zk, not the cloud state - we must have current info
leaderProps = getLeaderProps(collection, shard, 30000);
break;