Actually restore lost Node#start no-op check

This commit really reverts the inadvertent removal of allowing duplicate
calls to Node#start to be a no-op (but was mistakenly restored to
Node#stop in ddfa3a661510f25c2ce431dfd6fb86ac11eb8888).
This commit is contained in:
Jason Tedor 2016-04-14 14:13:31 -04:00
parent f87c599ff1
commit ea26e86880
1 changed files with 4 additions and 0 deletions

View File

@ -266,6 +266,10 @@ public class Node implements Closeable {
* Start the node. If the node is already started, this method is no-op.
*/
public Node start() {
if (!lifecycle.moveToStarted()) {
return this;
}
ESLogger logger = Loggers.getLogger(Node.class, NODE_NAME_SETTING.get(settings));
logger.info("starting ...");
// hack around dependency injection problem (for now...)