// 关闭ZooKeeper连接 // 释放资源 public async Task Close() { if (this.ZK != null) { await ZK.closeAsync(); } this.ZK = null; }
public Task CloseAsync() { return(ZK?.closeAsync()); }