Don't create enviroment more than once
This commit is contained in:
parent
cfa4689445
commit
fb713774a1
|
@ -271,7 +271,7 @@ public class Node implements Closeable {
|
||||||
resourcesToClose.add(circuitBreakerService);
|
resourcesToClose.add(circuitBreakerService);
|
||||||
modules.add(settingsModule);
|
modules.add(settingsModule);
|
||||||
modules.add(b -> {
|
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(ThreadPool.class).toInstance(threadPool);
|
||||||
b.bind(NodeEnvironment.class).toInstance(nodeEnvironment);
|
b.bind(NodeEnvironment.class).toInstance(nodeEnvironment);
|
||||||
b.bind(TribeService.class).toInstance(tribeService);
|
b.bind(TribeService.class).toInstance(tribeService);
|
||||||
|
|
Loading…
Reference in New Issue