Merge pull request #1440 from wurongjun/master

fix #1430
This commit is contained in:
rewerma
2019-01-17 10:46:30 +08:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -34,6 +34,10 @@ public class ZkClientx extends ZkClient {
return clients.get(servers); return clients.get(servers);
} }
public static void clearClients() {
clients.clear();
}
public ZkClientx(String serverstring){ public ZkClientx(String serverstring){
this(serverstring, Integer.MAX_VALUE); this(serverstring, Integer.MAX_VALUE);
} }

View File

@@ -503,6 +503,8 @@ public class CanalController {
if (zkclientx != null) { if (zkclientx != null) {
zkclientx.close(); zkclientx.close();
} }
ZkClientx.clearClients();
} }
private void initCid(String path) { private void initCid(String path) {