mirror of https://github.com/apache/lucene.git
only add a close hook for the httpshardhandlerfactory if *we* created it
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1294723 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
436ba5ff34
commit
6f40a126e6
|
@ -142,16 +142,17 @@ public class SearchHandler extends RequestHandlerBase implements SolrCoreAware ,
|
|||
shardHandlerFactory = core.getCoreDescriptor().getCoreContainer().getShardHandlerFactory();
|
||||
} else {
|
||||
shardHandlerFactory = core.createInitInstance(shfInfo, ShardHandlerFactory.class, null, null);
|
||||
core.addCloseHook(new CloseHook() {
|
||||
@Override
|
||||
public void preClose(SolrCore core) {
|
||||
shardHandlerFactory.close();
|
||||
}
|
||||
@Override
|
||||
public void postClose(SolrCore core) {
|
||||
}
|
||||
});
|
||||
}
|
||||
core.addCloseHook(new CloseHook() {
|
||||
@Override
|
||||
public void preClose(SolrCore core) {
|
||||
shardHandlerFactory.close();
|
||||
}
|
||||
@Override
|
||||
public void postClose(SolrCore core) {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public List<SearchComponent> getComponents() {
|
||||
|
|
Loading…
Reference in New Issue