优化节点到API节点连接管理

This commit is contained in:
刘祥超
2021-08-08 16:17:25 +08:00
parent 473a2db335
commit 5e00bfa4c1
3 changed files with 19 additions and 5 deletions

View File

@@ -134,6 +134,12 @@ func (this *NodeService) NodeStream(server pb.NodeService_NodeStreamServer) erro
}
nodeLocker.Unlock()
defer func() {
nodeLocker.Lock()
delete(requestChanMap, nodeId)
nodeLocker.Unlock()
}()
// 发送请求
go func() {
for {