优化初始化方式

This commit is contained in:
duanhf2012
2020-03-28 11:06:22 +08:00
parent 0ddeceb977
commit 7745ed39f3
7 changed files with 17 additions and 8 deletions

View File

@@ -119,7 +119,7 @@ func (slf *Cluster) InitCfg(currentNodeId int) error{
if ok == false {
return fmt.Errorf("NodeId %d not in any subnet",currentNodeId)
}
subnet.SubNetName = localSubnetName
for _,nodeinfo := range subnet.NodeList {
localSubNetMapNode[nodeinfo.NodeId] = nodeinfo
@@ -160,7 +160,7 @@ func (slf *Cluster) InitCfg(currentNodeId int) error{
slf.localNodeInfo =localNodeInfo
//读取服务
slf.ReadLocalSubNetServiceConfig(slf.localsubnet.SubNetName)
return err
}