Use Releasables.close here

This commit is contained in:
Robert Muir 2015-05-04 14:55:10 -04:00
parent 2be1a09c77
commit 06482e8424
1 changed files with 2 additions and 3 deletions

View File

@ -30,6 +30,7 @@ import org.elasticsearch.common.inject.spi.Message;
import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.jna.Kernel32Library; import org.elasticsearch.common.jna.Kernel32Library;
import org.elasticsearch.common.jna.Natives; import org.elasticsearch.common.jna.Natives;
import org.elasticsearch.common.lease.Releasables;
import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.logging.log4j.LogConfigurator; import org.elasticsearch.common.logging.log4j.LogConfigurator;
@ -177,9 +178,7 @@ public class Bootstrap {
private void stop() { private void stop() {
try { try {
if (node != null) { Releasables.close(node);
node.close();
}
} finally { } finally {
keepAliveLatch.countDown(); keepAliveLatch.countDown();
} }