This commit is contained in:
joy.zhou
2019-07-31 14:34:56 +08:00
parent 913bff4ed5
commit 3ff0f170c6
7 changed files with 137 additions and 88 deletions
-16
View File
@@ -88,19 +88,3 @@ func (b *Broker) checkNodeExist(id, url string) bool {
}
return false
}
func (b *Broker) CheckRemoteExist(remoteID, url string) bool {
exist := false
b.remotes.Range(func(key, value interface{}) bool {
v, ok := value.(*client)
if ok {
if v.route.remoteUrl == url {
v.route.remoteID = remoteID
exist = true
return false
}
}
return true
})
return exist
}