Fix: deadlock and sync issue in node pool

This commit is contained in:
HFO4
2021-11-03 21:27:53 +08:00
parent 1f06ee3af6
commit 5db476634a
5 changed files with 35 additions and 8 deletions

View File

@@ -136,7 +136,7 @@ func (pool *NodePool) Add(node *model.Node) {
old, ok = pool.inactive[node.ID]
}
if old != nil {
old.Init(node)
go old.Init(node)
return
}