Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Commit

Permalink
NodeDataChanged event should not trigger child watches
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiao Liang authored and leonshaw committed Mar 18, 2020
1 parent 2cc03de commit 2ececd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zk/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,10 @@ func (c *Conn) recvLoop(conn net.Conn) error {
switch res.Type {
case EventNodeCreated:
wTypes = append(wTypes, watchTypeExist)
case EventNodeDeleted, EventNodeDataChanged:
case EventNodeDeleted:
wTypes = append(wTypes, watchTypeExist, watchTypeData, watchTypeChild)
case EventNodeDataChanged:
wTypes = append(wTypes, watchTypeExist, watchTypeData)
case EventNodeChildrenChanged:
wTypes = append(wTypes, watchTypeChild)
}
Expand Down

0 comments on commit 2ececd4

Please sign in to comment.