We receive the application closing event before we receive the case closed event so we need to ensure that the Solr core is unloaded before we shutdown the server.

This commit is contained in:
Eamonn Saunders 2015-04-21 13:53:19 -04:00
parent d346cb79ef
commit c85abf121f

View File

@ -513,9 +513,18 @@ public class Server {
* Waits for the stop command to finish before returning.
*/
synchronized void stop() {
try {
// Close any open core before stopping server
closeCore();
}
catch (KeywordSearchModuleException e) {
logger.log(Level.WARNING, "Failed to close core: ", e); //NON-NLS
}
try {
logger.log(Level.INFO, "Stopping Solr server from: " + solrFolder.getAbsolutePath()); //NON-NLS
//try graceful shutdown
final String [] SOLR_STOP_CMD = {
javaPath,