skip self
This commit is contained in:
1 parent
7462afcfb5
commit
dc0f2185ab
2 files changed
+5
-4
No files matched your search
@@ -450,6 +450,10 @@ func (b *Broker) connectRouter(id, addr string) {
|
||||
}
|
||||
|
||||
func (b *Broker) checkNodeExist(id, url string) bool {
|
||||
if id == b.id {
|
||||
return false
|
||||
}
|
||||
|
||||
for k, v := range b.nodes {
|
||||
if k == id {
|
||||
return true
|
||||
|
||||
Reference in new issue
Block a user