节点启动时如果加载的是本地配置则在网络恢复后重新加载配置

This commit is contained in:
GoEdgeLab
2021-10-01 11:13:36 +08:00
parent 5be6fbdf5d
commit d0b1afe425
2 changed files with 24 additions and 0 deletions

View File

@@ -145,6 +145,16 @@ func (this *APIStream) handleConnectedAPINode(message *pb.NodeStreamMessage) err
return errors.Wrap(err)
}
remotelogs.Println("API_STREAM", "connected to api node '"+strconv.FormatInt(msg.APINodeId, 10)+"'")
// 重新读取配置
if nodeConfigUpdatedAt == 0 {
select {
case nodeConfigChangedNotify <- true:
default:
}
}
return nil
}