更新lite

This commit is contained in:
Mob2003
2023-04-08 21:28:06 +08:00
parent ac68df552e
commit b48e9e77ac
12 changed files with 274 additions and 262 deletions
-21
View File
@@ -74,25 +74,4 @@ func getNode(arg string) (*node, error) {
return connectNew(arg)
}
func getNodeWithCurrentNode(arg string) (*node, error) {
l := clientLock.RLock()
id, err := strconv.Atoi(arg)
if err == nil {
for _, n := range nodeMap {
if n.id == id {
l.RUnlock()
return n, nil
}
}
} else {
if v, ok := nodeMap[arg]; ok {
l.RUnlock()
return v, nil
}
}
l.RUnlock()
return connectNew(arg)
}