fix bug: close zk links .
diff --git a/escheduler-api/src/main/java/cn/escheduler/api/service/MonitorService.java b/escheduler-api/src/main/java/cn/escheduler/api/service/MonitorService.java
index ec7b50b..41322d0 100644
--- a/escheduler-api/src/main/java/cn/escheduler/api/service/MonitorService.java
+++ b/escheduler-api/src/main/java/cn/escheduler/api/service/MonitorService.java
@@ -111,10 +111,11 @@
         zookeeperMonitor = new ZookeeperMonitor();
         servers = zookeeperMonitor.getServers(isMaster);
     }catch (Exception e){
-        if(zookeeperMonitor != null){
-          zookeeperMonitor.close();
-        }
         throw e;
+    }finally {
+      if(zookeeperMonitor != null){
+        zookeeperMonitor.close();
+      }
     }
     return servers;
   }