From bb449d6cb926676ab83d26ac35509b0f024f1117 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 13 Dec 2022 19:26:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E6=96=97=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/battle/clients.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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