samuel / go-zookeeper

Native ZooKeeper client for Go. This project is no longer maintained. Please use https://github.com/go-zookeeper/zk instead.
BSD 3-Clause "New" or "Revised" License
1.64k stars 672 forks source link

How can I cancel an event watcher? #94

Open smousa opened 8 years ago

smousa commented 8 years ago

Is there a way to cancel a ChildrenW or GetW event?

ahjdzx commented 8 years ago

@samuel

tevino commented 8 years ago

Same issue here, seems no way...

Here is the only place where the watchers will be removed: https://github.com/samuel/go-zookeeper/blob/master/zk/conn.go#L630

tevino commented 8 years ago

Here's a PR featuring Conn.RemoveWatcher, works great for me: https://github.com/samuel/go-zookeeper/pull/110 The project seems out of maintenance, just use the fork.

cerisier commented 8 years ago

Would love to see this merged as well