mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-04 01:56:34 +08:00
每个服务只初始化一次
This commit is contained in:
@@ -172,6 +172,11 @@ func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
||||
|
||||
// servers
|
||||
for _, server := range this.Servers {
|
||||
// 避免在运行时重新初始化
|
||||
if server.IsInitialized() {
|
||||
continue
|
||||
}
|
||||
|
||||
// 初始化
|
||||
errs := server.Init()
|
||||
if len(errs) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user