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
This commit is contained in:
Yonik Seeley 2008-09-02 15:09:30 +00:00
parent 70821f0ebc
commit 4b1db2391f
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}