Skip to content
Snippets Groups Projects
Commit ade85d64 authored by vito.he's avatar vito.he
Browse files

modify zk ListenServiceEvent

parent 0804c09c
No related branches found
No related tags found
No related merge requests found
......@@ -114,8 +114,9 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
content, _, err := l.client.Conn.Get(zkPath)
if err != nil {
logger.Errorf("Get new node path {%v} 's content error,message is {%v}", zkPath, perrors.WithStack(err))
} else {
listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeUpdate, Content: string(content)})
}
listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeUpdate, Content: string(content)})
} else {
logger.Errorf("path{%s} child nodes changed, zk.Children() = error{%v}", zkPath, perrors.WithStack(err))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment