From 4b1db2391f3e44e09ccc9cc92294a9268d352791 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Tue, 2 Sep 2008 15:09:30 +0000 Subject: [PATCH] SOLR-745: check that cached admin core isn't closed git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@691270 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/solr/core/CoreContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/solr/core/CoreContainer.java b/src/java/org/apache/solr/core/CoreContainer.java index d2572676926..ff0076f08e4 100644 --- a/src/java/org/apache/solr/core/CoreContainer.java +++ b/src/java/org/apache/solr/core/CoreContainer.java @@ -463,17 +463,17 @@ public class CoreContainer public SolrCore getAdminCore() { synchronized (cores) { SolrCore core = adminCore != null ? adminCore.get() : null; - if (core != null) { + if (core != null && !core.isClosed()) { core.open(); } else { for (SolrCore c : cores.values()) { if (c != null) { core = c; core.open(); + setAdminCore(core); break; } } - setAdminCore(core); } return core; }