diff --git a/modules/battle/clients.go b/modules/battle/clients.go index 99261756c..f851433b8 100644 --- a/modules/battle/clients.go +++ b/modules/battle/clients.go @@ -40,9 +40,11 @@ func (this *clientComp) Init(service core.IService, module core.IModule, comp co func (this *clientComp) Start() (err error) { err = this.ModuleCompBase.Start() - for i, v := range this.options.BattleServerAddr { - if this.clinets[i], err = newClient(v, i, this, this.options.Log); err != nil { - return + if this.options.OpenCheck { + for i, v := range this.options.BattleServerAddr { + if this.clinets[i], err = newClient(v, i, this, this.options.Log); err != nil { + return + } } } return