mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-18 00:24:20 +00:00
fix[net]: 优雅关闭服务器的时候zookeeper的空指针异常
This commit is contained in:
@@ -573,6 +573,9 @@ public class ZookeeperRegistry implements IRegistry {
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
if (curator == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (curator.getState() == CuratorFrameworkState.STARTED) {
|
||||
// 删除服务提供者的临时节点
|
||||
|
||||
Reference in New Issue
Block a user