diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java index 928deb2f916..ac388b9824c 100644 --- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java +++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java @@ -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;