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

This commit is contained in:
GoEdgeLab
2021-08-08 16:17:25 +08:00
parent e979414973
commit a5118536e7
3 changed files with 19 additions and 5 deletions

View File

@@ -170,6 +170,12 @@ func (this *NSNodeService) NsNodeStream(server pb.NSNodeService_NsNodeStreamServ
}
nodeLocker.Unlock()
defer func() {
nodeLocker.Lock()
delete(requestChanMap, nodeId)
nodeLocker.Unlock()
}()
// 发送请求
go func() {
for {