From cfa0409cc5e795f5c31528ad96f5ec3e7c415f71 Mon Sep 17 00:00:00 2001 From: NoahLan <6995syu@163.com> Date: Thu, 14 Sep 2023 15:12:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine.go b/engine.go index caa38eb..8f20957 100644 --- a/engine.go +++ b/engine.go @@ -44,16 +44,16 @@ func NewEngine(conf config.EngineConf, opts ...RunOption) *Engine { }, } - for _, opt := range opts { - opt(ngin) - } - if ngin.pool == nil { ngin.pool, _ = ants.NewPool(math.MaxInt32) } ngin.evtMgr = event.NewEventManager(ngin.pool) + for _, opt := range opts { + opt(ngin) + } + return ngin }