每个服务只初始化一次

This commit is contained in:
刘祥超
2022-09-22 11:09:11 +08:00
parent d9fb6a2c84
commit dd460bc40d
2 changed files with 16 additions and 0 deletions

View File

@@ -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 {