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

why EventNodeDataChanged trigger children watch? #252

Open darkterrorooo opened 4 years ago

darkterrorooo commented 4 years ago

as source code below, if data of path change , it will trigger three event. why not only trigger watchTypeData

func (c *Conn) recvLoop(conn net.Conn) error {
.... case EventNodeDeleted, EventNodeDataChanged: wTypes = append(wTypes, watchTypeExist, watchTypeData, watchTypeChild)

.... }