From fb713774a140bd0dfe672694ca69159b8b009909 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 20 Jun 2016 11:45:52 +0200 Subject: [PATCH] Don't create enviroment more than once --- core/src/main/java/org/elasticsearch/node/Node.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/elasticsearch/node/Node.java b/core/src/main/java/org/elasticsearch/node/Node.java index 2069320104a..9c849bbe14b 100644 --- a/core/src/main/java/org/elasticsearch/node/Node.java +++ b/core/src/main/java/org/elasticsearch/node/Node.java @@ -271,7 +271,7 @@ public class Node implements Closeable { resourcesToClose.add(circuitBreakerService); modules.add(settingsModule); modules.add(b -> { - b.bind(Environment.class).toInstance(new Environment(settings)); + b.bind(Environment.class).toInstance(environment); b.bind(ThreadPool.class).toInstance(threadPool); b.bind(NodeEnvironment.class).toInstance(nodeEnvironment); b.bind(TribeService.class).toInstance(tribeService);