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 }