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

Fix:can not need children id

parents 51e0b98e b4015866
No related branches found
No related tags found
No related merge requests found
......@@ -129,14 +129,14 @@ func (l *ZkEventListener) handleZkNodeEvent(zkPath string, children []string, li
continue
}
// listen l service node
go func(node, childNode string) {
go func(node string) {
logger.Infof("delete zkNode{%s}", node)
if l.ListenServiceNodeEvent(node, listener) {
logger.Infof("delete content{%s}", childNode)
logger.Infof("delete content{%s}", node)
listener.DataChange(remoting.Event{Path: zkPath, Action: remoting.EventTypeDel})
}
logger.Warnf("listenSelf(zk path{%s}) goroutine exit now", zkPath)
}(newNode, n)
}(newNode)
}
// old node was deleted
......
......@@ -18,7 +18,6 @@
package zookeeper
import (
"fmt"
"sync"
"testing"
"time"
......@@ -28,6 +27,7 @@ import (
"github.com/stretchr/testify/assert"
)
import (
"github.com/apache/dubbo-go/common/logger"
"github.com/apache/dubbo-go/remoting"
)
......@@ -113,7 +113,7 @@ type mockDataListener struct {
}
func (m *mockDataListener) DataChange(eventType remoting.Event) bool {
fmt.Println(eventType)
logger.Info(eventType)
m.eventList = append(m.eventList, eventType)
if eventType.Content == m.changedData {
m.wait.Done()
......
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