mirror of https://github.com/apache/lucene.git
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:
parent
70821f0ebc
commit
4b1db2391f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue