diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-02-14 13:28:08 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-02-14 13:28:08 +0100 |
commit | 693874c67d1500f00d9388f1e71f799cfe4e3cad (patch) | |
tree | 04508b3b5894c5f5fbef4f97556715dfe0b8fdcd /clustercontroller-apps | |
parent | 2d4809f59c0948bc4aa92eb3a3eddb7fdb9e8010 (diff) |
Also shut down Curator instances created during clustercontroller component setup
Diffstat (limited to 'clustercontroller-apps')
-rw-r--r-- | clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java index ff7cbbf83da..8ec93b99aff 100644 --- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java +++ b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterController.java @@ -100,8 +100,9 @@ public class ClusterController extends AbstractComponent */ private void verifyThatZooKeeperWorks(FleetControllerOptions options) throws Exception { if (options.zooKeeperServerAddress != null && !"".equals(options.zooKeeperServerAddress)) { - Curator curator = Curator.create(options.zooKeeperServerAddress); - curator.framework().blockUntilConnected(); + try (Curator curator = Curator.create(options.zooKeeperServerAddress)) { + curator.framework().blockUntilConnected(); + } } } |