Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zengfanwei committed Jan 7, 2021
1 parent ba38dbc commit 359482c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions remoting/zookeeper/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
} else {
logger.Errorf("path{%s} child nodes changed, zk.Children() = error{%v}", zkPath, perrors.WithStack(err))
}
return
}

// a node was added -- listen the new node
Expand Down Expand Up @@ -185,11 +186,6 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
continue
}

if err != nil {
logger.Errorf("NewURL(i{%s}) = error{%v}", n, perrors.WithStack(err))
continue
}

oldNode = path.Join(zkPath, n)
logger.Warnf("delete zkPath{%s}", oldNode)
listener.DataChange(remoting.Event{Path: oldNode, Action: remoting.EventTypeDel})
Expand Down

0 comments on commit 359482c

Please sign in to comment.